user - What to Order Status in Opencart My Account page -
thanks helps or points me in right direction.
i want show order status in opencart user (my account) page. show status status id. pending status id:1 , want show pending status. other status not appear.
<a href="#"><?php echo $order_statuses['order_status_id']; ?></a>
i put @ account.tpl result error. please me.
maybe need modify
*english/account/account.php
controller/account/account.php
template/module/account.tpl*
my open cart version 1.5.6.3 custom theme.
in account.php have add this.
$this->load->model('account/order'); $results = $this->model_account_order->getorders(0, 5); foreach ($results $result) { $product_total = $this->model_account_order->gettotalorderproductsbyorderid($result['order_id']); $voucher_total = $this->model_account_order->gettotalordervouchersbyorderid($result['order_id']); $this->data['orders'][] = array( 'order_id' => $result['order_id'], 'name' => $result['firstname'] . ' ' . $result['lastname'], 'status' => $result['status'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'products' => ($product_total + $voucher_total), 'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']), 'href' => $this->url->link('account/order/info', 'order_id=' . $result['order_id'], 'ssl'), 'reorder' => $this->url->link('account/order', 'order_id=' . $result['order_id'], 'ssl') ); } in account.tpl add code <div id="resent_order" class="recent_order"> <a style="float:right; margin-bottom:15px;" href="<?php echo $manage_order; ?>" class="button">manage orders</a><h4>recent order</h4> <ul style="clear:both;"> <?php if( isset($orders) && count($orders > 0 ) ){ foreach ($orders $order) { ?> <li> <div><strong>order:#</strong><?php echo $order['order_id']; ?></div> <div><strong>date:</strong> <?php echo $order['date_added']; ?></div> <div><strong>amount:</strong> <?php echo $order['total']; ?></div> <div><strong>status:</strong> <?php echo $order['status']; ?></div> <div class="editpan"><a class="" title="edit" href="<?php echo $order['href']; ?>">edit</a></div> </li> <?php } ?> <?php }else{?> <li>you have no recent orders.</li><?php } ?> </ul> </div>
Comments
Post a Comment