- Posts: 190
- Thank you received: 0
Display in Frontend counter for nb products sold ?
- codewarrior
-
Topic Author
- Offline
Less
More
11 years 6 months ago #196783
by codewarrior
Display in Frontend counter for nb products sold ? was created by codewarrior
-- HikaShop version -- : 2.2
Hi,
I would like to display in the frontend a counter with total nb products sold.
ie. there's an offer and I would like to display how much are sold on the period.
How could it be possible in a module ?
Thanks for ideas.
Regards
Hi,
I would like to display in the frontend a counter with total nb products sold.
ie. there's an offer and I would like to display how much are sold on the period.
How could it be possible in a module ?
Thanks for ideas.
Regards
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 6 months ago #196789
by Mohamed Thelji
Replied by Mohamed Thelji on topic Display in Frontend counter for nb products sold ?
Hello,
Their is no option to do that, so you'll have to use some custom code which will require development skills.
Their is no option to do that, so you'll have to use some custom code which will require development skills.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
11 years 6 months ago #196977
by codewarrior
Replied by codewarrior on topic Display in Frontend counter for nb products sold ?
OK no problem.
Could you put me on the way to develop it ?
Thanks
Could you put me on the way to develop it ?
Thanks
Please Log in or Create an account to join the conversation.
11 years 6 months ago #196983
by nicolas
Replied by nicolas on topic Display in Frontend counter for nb products sold ?
Hi,
You can use such module in order to add your PHP code inside a module on your Joomla website:
extensions.joomla.org/extension/blank-module
In it, do first a query on the hikashop_order table in order to get the order_id of all the orders confirmed in that period and then do a second query to sum the order_product_quantity field of the hikashop_order_product table with the order_id in the list of the order_ids you got from the first query and you'll get your total number that you can just echo.
You can use such module in order to add your PHP code inside a module on your Joomla website:
extensions.joomla.org/extension/blank-module
In it, do first a query on the hikashop_order table in order to get the order_id of all the orders confirmed in that period and then do a second query to sum the order_product_quantity field of the hikashop_order_product table with the order_id in the list of the order_ids you got from the first query and you'll get your total number that you can just echo.
The following user(s) said Thank You: codewarrior
Please Log in or Create an account to join the conversation.
Time to create page: 0.236 seconds