是否有可能獲得最後一個訂單id訂購成功頁面?我只是想獲得最後的訂單ID,這樣我就可以設置爲我的模板文件success.tpl
一個鏈接,鏈接會進入最後的訂單信息頁面.. 我曾試圖從東西controller/checkout/success.php
opencart獲得最後一個訂單id到成功頁面
$this->load->model('checkout/order');
$order_last_id = $this->db->getLastId();
$this->data['order_info'] = $this->url->link('account/order/info', 'order_id=' . $order_last_id, 'SSL');
但是,運氣不好我得到0
訂單ID
index.php?route=account/order/info&order_id=0
任何一個能幫助我獲得最後訂單ID網址?
感謝...