order - Notification for user in user account opencart -


thanks helps or points me in right direction.

i want show pending notification user in account page after login. notification show when order status pending. after changing other status admin remove notification.

this notification show like:

your order id: order status: , [ button custom url]

if multiple order show multiple order id. open cart version 1.5.6.3 custom theme.

    $this->load->model('account/order');     $results = $this->model_account_order->getorders();      foreach ($results $result) {         $product_total = $this->model_account_order->gettotalorderproductsbyorderid($result['order_id']);         $voucher_total = $this->model_account_order->gettotalordervouchersbyorderid($result['order_id']);         if( $result['status'] =! 5){ // 5 order status means completed             $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">pending 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 pending orders.</li><?php }  ?>                   </ul>              </div> 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -