We add the edit button when viewing the order
Order editing button for viewing - simple and convenient solution for opencart
πŸ’Ό Creation of modern websites of any complexity. | πŸ‘Œ WEB-UKRAINE.COM

We add the edit button when viewing the order

5/51 rating

Greetings dear visitor. If you are a happy owner of an online store based on opencart then I think this little note for you will be interesting.

Probably you already noticed that in opencart the order view and its editing are on different pages, and if you have read the order from the admin panel and you need to change something in it, you need to go back to the list of orders and click on the edit button on the right the required order, you will agree it is not very convenient.

In this regard, I suggest you a simple solution to simplify the task, and make the output of the button edit the order straight from the order viewing page, it is much more convenient and will save your time than constantly running from page to page.

PS: Also, pay attention to the article I wrote before "Add a button to change to a product card" maybe it will also interest you.

And so the order editing button when viewing it, as it looks click to enlarge:

Now let's look at how to implement this at home, and make it possible to display the edit button in opencart when viewing the order, in general, proceed.

The first item we will have is theΒ admin/controller/sale/order.php file of it and will be the first to edit:

We find in the above file a line of code:

And before him we need to add this:

Then look for the code:

and add the following:

Ok, with the controller's file finished, and our second step will be to add an inscription to the language file for the button, namely, the word to change the order.
Open the fileΒ admin/language/russian/russian.php , well, or if you have another language or several languages, then open the required ones, and after:

ДобавляСм:

Well, now it remains for us to output all this into the template of the mapping itself, that is to the fileΒ admin/view/template/sale/order_info.tpl

Open this file after:

Add the following:

That's all, as they say "a trifle nice" :)

Now you know how to add a change button to the order view, try it and you will all get it. Good luck to you!

You may also like

No Comment

You can post first response comment.

Leave a Reply

Π’ΠΈΠ±Π΅Ρ€Ρ–Ρ‚ΡŒ спосіб спілкування
Звязатися Π· Π½Π°ΠΌΠΈ!
Ми Π³ΠΎΡ‚ΠΎΠ²Ρ– Π΄ΠΎ Π΄Ρ–Π°Π»ΠΎΠ³Ρƒ.