4 comments on “Adding Order ID to Checkout Success in OpenCart 2.2.0.0

  1. Hi Admin,

    Thank you so much. I tried it’s working.
    I need your help for showing Total Amount,
    I want to show total amount on that page also. I tried following code but total amount not showing.

    if (isset($this->session->data[‘order_id’])) {
    $this->load->model(‘checkout/order’);
    $data[‘orderDetails’] = $this->model_checkout_order->getOrder($this->session->data[‘order_id’]);
    $data[‘orderAmount’] = $this->cart->getTotal($this->session->data[‘total’]);

    • Kinda just grasping at straws here but I think you would want to stick with orderDetails instead of changing it to orderAmount. Just change order_id to order_total

      $data[‘orderDetails’] = $this->model_checkout_order->getOrder($this->session->data[‘order_total’]);

      Then you would make is show up by adding
      < ?php echo $orderDetails['order_total']; ?>

    • I just approved and responded to an older comment. Check it out. It may help but I’m not really an expert on this and usually just keep trying things until one works.

      The order status would always be the same wouldn’t it? That could just be static text.

Leave a Reply

Your email address will not be published. Required fields are marked *