Skip to main content

Display in Frontend counter for nb products sold ?

More
11 years 6 months ago #196783 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

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #196789 by Mohamed Thelji
Hello,
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.

More
11 years 6 months ago #196977 by codewarrior
OK no problem.
Could you put me on the way to develop it ?
Thanks

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #196983 by nicolas
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.
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
Powered by Kunena Forum