FLASH SALE Promo Gajian! Potongan harga hingga Rp 400.000. KLAIM PROMO

Status gagal Nampil myorder/detail

Ditanyakan pada tanggal 16 January 2020 oleh Jhonatan Hasian Siahaan Edit  Hapus  Tandai Selesai  Tandai 

An uncaught Exception was encountered Type: ParseError

Message: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF)

Filename: D:\xampp\htdocs\cishop\application\views\layouts_status.php

Line Number: 26

Backtrace:

File: D:\xampp\htdocs\cishop\application\views\pages\myorder\detail.php Line: 12 Function: view

File: D:\xampp\htdocs\cishop\application\views\layouts\app.php Line: 28 Function: view

File: D:\xampp\htdocs\cishop\application\core\MY_Controller.php Line: 25 Function: view

File: D:\xampp\htdocs\cishop\application\controllers\Myorder.php Line: 55 Function: view

File: D:\xampp\htdocs\cishop\index.php Line: 320 Function: require_once

BUAT KOMENTAR

1 JAWABAN / 0 KOMENTAR

User avatar

Hai kak,

Sepertinya ada salah tutup endif pada akhir bagian, coba perhatikan dan ikuti kode ini :

<?php 
    if ($status == 'waiting') {
        $badge_status   = 'badge-primary';
        $status         = 'Menunggu Pembayaran';
    }

    if ($status == 'paid') {
        $badge_status   = 'badge-secondary';
        $status         = 'Dibayar';
    }

    if ($status == 'delivered') {
        $badge_status   = 'badge-success';
        $status         = 'Dikirim';
    }

    if ($status == 'cancel') {
        $badge_status   = 'badge-danger';
        $status         = 'Dibatalkan';
    }
?>

<?php if ($status) : ?> 
<span class="badge badge-pill <?= $badge_status ?>"><?= $status ?></span>
<?php endif ?>

Pakai titik dua, juga endif.

BUAT KOMENTAR