Is it possible to display the current number of "Total Orders" inside an HTML Content Module please?
Thanks.
Thanks.
HelloMonarchy Catering wrote: ↑Wed Nov 08, 2017 12:10 amIs it possible to display the current number of "Total Orders" inside an HTML Content Module please?
Thanks.
please share a screen shot on which page you want to Show Total Orders.??
Thanks
sachin
Hello, and thanks for the reply.sachin6609 wrote: ↑Wed Nov 08, 2017 5:51 pmHelloMonarchy Catering wrote: ↑Wed Nov 08, 2017 12:10 amIs it possible to display the current number of "Total Orders" inside an HTML Content Module please?
Thanks.
please share a screen shot on which page you want to Show Total Orders.??
Thanks
sachin
It would be on the Home page, in any module or code format that would work.
Thank you.
If you mean by using a parsed tag, it would require some coding into your admin/view/javascript/summernote/summernote.js file along with the font keys but instead of font keys, you'd return your total orders results with your used parsed tag key inside your HTML module. From the catalog-end, you'd need to convert this parsed tag key back into the total orders text.
With that being said, you'd need to re-capture the total orders from the catalog-end in order to obtain the total order results. In other words, it could be done but would not be the most simplistic approach to use. Rather to create a separate row in your catalog-end page that would simply display the total orders for that particular element you've selected would be much simplistic.
With that being said, you'd need to re-capture the total orders from the catalog-end in order to obtain the total order results. In other words, it could be done but would not be the most simplistic approach to use. Rather to create a separate row in your catalog-end page that would simply display the total orders for that particular element you've selected would be much simplistic.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Yikes, I thought the OC technology would be more mature and the page generation has basic access to overall sales / catalog datastraightlight wrote: ↑Wed Nov 08, 2017 10:47 pmIf you mean by using a parsed tag, it would require some coding into your admin/view/javascript/summernote/summernote.js file along with the font keys but instead of font keys, you'd return your total orders results with your used parsed tag key inside your HTML module. From the catalog-end, you'd need to convert this parsed tag key back into the total orders text.
With that being said, you'd need to re-capture the total orders from the catalog-end in order to obtain the total order results. In other words, it could be done but would not be the most simplistic approach to use. Rather to create a separate row in your catalog-end page that would simply display the total orders for that particular element you've selected would be much simplistic.
I must admit that I am a convert to OC being a Magento developer, much more intutitve and robust.
The technology is there in Opencart. You just need to know how to combine those basic features all together.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Are you asking for total orders that the customer has placed?Monarchy Catering wrote: ↑Wed Nov 08, 2017 6:49 pmIs it possible to display the current number of "Total Orders" inside an HTML Content Module please?
Thanks.
Or are you asking for total site orders ? Do you want this visible for all to see?
Either are quite easy to display.
Hello,Qphoria wrote: ↑Sun Nov 12, 2017 5:57 amAre you asking for total orders that the customer has placed?Monarchy Catering wrote: ↑Wed Nov 08, 2017 6:49 pmIs it possible to display the current number of "Total Orders" inside an HTML Content Module please?
Thanks.
Or are you asking for total site orders ? Do you want this visible for all to see?
Either are quite easy to display.
I am looking to display "TOTAL SITE ORDERS", as we are moving from our old site which has been active for almost 10 years now.
I love the term "Easy"
Thanks.
It's just odd that you'd want to show private information like that on the homepage but yea easy..
You have a few options.
1. You can create a module
This means you need to create all the supporting files for a module (at least 6 files, (admin side controller, language, view) (catalog side controller, language, view). This will then let it use the module system. But might be more than you need for displaying just some simple data.
2. Create a simple vQmod to alter the homepage or header and have the data shown there.
I'll explain this method as you like the "Easy" term. And I'll assume you want it shown in the header so that it shows on all pages. But if you only want it on certain pages, you can swap out the header controller for a different controller that you want to show it on. Controllers are basically the base page. So the "home" controller controls whats on the home page, the account controller controls whats on the account page.. and so on.
Controller:
a. EDIT: catalog/controller/common/header.php
b. Find:
c. After, add:
View:
In 2.3 you could edit the theme files directly. In 3.0, you use the admin theme editor. This will override the default.
a. Goto Admin->Design->Theme Editor
b. Load common/header.twig
c. Find:
d. After, add:
That will show you the order count as shown in the screenshot attached. Obviously you'll want to style this better and likely move it to another location but this should give you a bit of understanding how to do it. It is really quite easy.... ignore the dramatic folks.
Ideally you'd create this as a vQmod (or ocmod) file so that you don't need to edit core files. But baby steps...
You have a few options.
1. You can create a module
This means you need to create all the supporting files for a module (at least 6 files, (admin side controller, language, view) (catalog side controller, language, view). This will then let it use the module system. But might be more than you need for displaying just some simple data.
2. Create a simple vQmod to alter the homepage or header and have the data shown there.
I'll explain this method as you like the "Easy" term. And I'll assume you want it shown in the header so that it shows on all pages. But if you only want it on certain pages, you can swap out the header controller for a different controller that you want to show it on. Controllers are basically the base page. So the "home" controller controls whats on the home page, the account controller controls whats on the account page.. and so on.
Controller:
a. EDIT: catalog/controller/common/header.php
b. Find:
Code: Select all
$data['title']
Code: Select all
$data['order_count'] = $this->db->query("SELECT count(*) FROM `" . DB_PREFIX . "order`")->row['count(*)'];
View:
In 2.3 you could edit the theme files directly. In 3.0, you use the admin theme editor. This will override the default.
a. Goto Admin->Design->Theme Editor
b. Load common/header.twig
c. Find:
Code: Select all
<body>
Code: Select all
Total # of Orders: {{ order_count}}
Ideally you'd create this as a vQmod (or ocmod) file so that you don't need to edit core files. But baby steps...
Attachments
total_orders_example.png (14.41 KiB) Viewed 1296 times
Total Sales is not really private as such and the number of sales will highlight have successful the website is and give the prospective customer some confidence in the website
I really want to show the totals sales as part of the introductory text regarding the business on the Home Page.
Thank you for taking the time. It actually seems extremely straightforward and I'll try my first OCMOD file.
Will let you know.
Thank you and best wishes.
I really want to show the totals sales as part of the introductory text regarding the business on the Home Page.
Thank you for taking the time. It actually seems extremely straightforward and I'll try my first OCMOD file.
Will let you know.
Thank you and best wishes.
Who is online
Users browsing this forum: No registered users and 375 guests