| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Set the time period for Bestsellers | |||
|
|
Thread Tools |
#1
|
|||||||
|
|||||||
Set the time period for Bestsellers
I have a client who runs an online fashion shop and I've just set up the bestsellers for her, but since their stock turns over so quickly, I only want the bestsellers displaying for the past (x) number of days and not every order in the shop.
Is there a mod out there already written to do this?
__________________
Version 4.1.6 to 4.1.11 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Set the time period for Bestsellers
As you know the module Advanced statistics is very slowly but it's required for Bestsellers module.
I'd recommend you new method of "real" Bestsellers, based on purchases statistics, not views statistics. Open file /modules/Bestsellers/bestsellers.php and remove all lines between Code:
Code:
Code:
Currently this code select bestsellers which add less that 3 days. You can change it in query, find (($tm-p.add_date)/86400)<3 and change number 3 to another period in days. It's fast and effective method of bestsellers' selection without heavy Advanced statistics module enabled and heavy queries used. I've make small changes without testing so if you will have any problems please don't hesitate to ask any questions.
__________________
Regards, Anthony Holub X-Cart Skins Store - twenty two different skins available; - both 4.1.x and 4.2.x versions compatible; - refresh you store now! Smart menu X-Cart add-on Featured Products Slide Show X-Cart add-on "What's New?" FREE X-Cart add-on |
|||||||||
#3
|
|||||||
|
|||||||
Re: Set the time period for Bestsellers
I will give that a run on a test site and see how I go.
Thanks for the info.
__________________
Version 4.1.6 to 4.1.11 |
|||||||
#4
|
|||||||
|
|||||||
Re: Set the time period for Bestsellers
Hi Anthony,
Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Brilliant and so easy to do. I used it on 4.1.6 with no trouble whatsoever.
__________________
Version 4.1.6 to 4.1.11 |
|||||||
#5
|
|||||||
|
|||||||
Re: Set the time period for Bestsellers
So sorry to try to resurrect a 10 year old thread from the grave, but we are looking to implement this type of feature on our store. Anybody have any thoughts on this for v4.6.x and/or v4.7.x? It just seems silly to look at bestseller data for the entire time the shop has been open, my customer want to know what has been selling well recently, like within the past 3-6 months. Cheers!
__________________
Michael Development X-Cart Gold Plus v4.7.12 - php 7.3 - reBOOT reDUX - other goodies X-Cart Gold v4.7.7 - reBOOT Template - XPayments 3.0.2 - Abandoned Cart Reminder - BCSE Reward Points - BCSE Stock Notify - XPDF Invoices |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Set the time period for Bestsellers
I don't have any new code, but I would give this old suggestion a try. You may have to tweak it a little but it might give you a good start.
|
|||||||||
#7
|
|||||||
|
|||||||
Re: Set the time period for Bestsellers
It looks like the code has changed way too much for someone of my level to try to sort out. Any developers out there want to give me a quote on being able to limit bestsellers to a number of days? Maybe in addition a Bestsellers static page that lists the bestsellers for each category?
Thanks!
__________________
Michael Development X-Cart Gold Plus v4.7.12 - php 7.3 - reBOOT reDUX - other goodies X-Cart Gold v4.7.7 - reBOOT Template - XPayments 3.0.2 - Abandoned Cart Reminder - BCSE Reward Points - BCSE Stock Notify - XPDF Invoices |
|||||||
#8
|
|||||||||
|
|||||||||
Re: Set the time period for Bestsellers
The query seems to still be valid and you could put this before the $smarty->assign at the end, though I would also disable the $bestsellers=func_search_products section just before. This seems to be in line with the original instructions.
|
|||||||||
|
Thread Tools | |
|
|
|
|||
X-Cart forums © 2001-2020
|