V
V
Vitaly Gavrilov2019-03-03 22:25:38
opencart
Vitaly Gavrilov, 2019-03-03 22:25:38

How to display last order ID in OpenCart?

Good afternoon. I started to learn PHP and at the same time create an online store. Tell me, please, I want to display the line "Total completed orders: %s" on the main page of the site. I can't quite figure out how to do this. I found that this code will need to be inserted into the header.twig template , all that remains is to write the code :)
Picking aside But it doesn't output anything. Help me please :(
$blablabla->session->data['last_order_id'];

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zoozag, 2019-03-03
@zoozag

Found that this code will need to be inserted into the header.twig template

The code will need to be inserted in several places.
Model - Controller - Template - Language files
First read how Opencart works from the inside. According to this
I pick aside $blablabla->session->data['last_order_id'];
you have not even looked into the documentation yet, but only looked at the solution of a similar problem from the corner of your eye.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question