Is it somehow possible to show bestsellers of a period of time (f.e. the last 3 months) instead of forever? This would create dynamic blocks, much more interesting than always showing the same products (usually the add-on just shows products that stores had since the beginning).
Is it somehow possible to show bestsellers of a period of time (f.e. the last 3 months) instead of forever? This would create dynamic blocks, much more interesting than always showing the same products (usually the add-on just shows products that stores had since the beginning).
Thanks!
Unfortunately it is impossible in default CS-Cart because this addon calculates sales in separate database table. However the easiest way to achieve what you want is to develop cron script which will recalculate sales for all products in the store depending on the specified timeframe. Please contact us if you are interested in this modification.
Unfortunately it is impossible in default CS-Cart because this addon calculates sales in separate database table. However the easiest way to achieve what you want is to develop cron script which will recalculate sales for all products in the store depending on the specified timeframe. Please contact us if you are interested in this modification.
I was able to reach at the query atleast required for this but dont know how i can incorporate in the bestseller addon so that this data is shown as per the query.
SELECT P.product_id, COUNT( P.product_id ) , GROUP_CONCAT( O.order_id )
FROM cscart_products AS P
JOIN cscart_order_details AS OD ON OD.product_id = P.product_id
JOIN cscart_orders AS O ON O.order_id = OD.order_id
WHERE O.timestamp > UNIX_TIMESTAMP( NOW( ) - INTERVAL 6
MONTH )
GROUP BY P.product_id
ORDER BY COUNT( P.product_id ) DESC