| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Best Sellers WITH OUT Advanced Statistics | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Best Sellers WITH OUT Advanced Statistics
Heres a quick mod to enable Best Sellers without slowing down your site by turning on Advanced Statistics. Instead it uses the power of MySQL to do the research for you.
This script will also add how many times this product has been purchased for the last thirty days as well. You can of course simply remove this feature in the new template file if you don't want this displayed. Please note this has only been tested on version 4.1 To begin create a new file "/modules/Bestsellers/newbestsellers.php" Paste in the following code into the new file: Code:
Next create a new file "/skin1/modules/Bestsellers/newbestsellers.tpl" Paste in the following code and customize to your liking: Code:
Next find the following in home.php Code:
Replace with: Code:
Finally add the following anywhere on your homepage where you want these displayed. Code:
Enjoy Edit: Changed MySQL call to exclude failed transactions. |
|||||||
#2
|
|||||||
|
|||||||
Re: Best Sellers WITH OUT Advanced Statistics
Hello,
I tried the code and it does work for me on 4.1.3 on category's and welcome page, but the new bestsellers menu that I copied your code into seems to disappear on the product details page. Do you happen to know why? Thanks!
__________________
X-Cart Gold v4.4.1 |
|||||||
#3
|
|||||||
|
|||||||
Re: Best Sellers WITH OUT Advanced Statistics
Sorry for the long delay. I actually didn't notice the question the first time through..
We only use best sellers on the home page but I did find the code your looking for to fix this on the products page. locate this in product.php: Code:
replace with Code:
Also if this is being displayed on the shopping cart then you will need to edit cart.php and add... Code:
|
|||||||
#4
|
|||||||
|
|||||||
Re: Best Sellers WITH OUT Advanced Statistics
Thanks for letting me know. I appreciate it.
- Steve
__________________
X-Cart Gold v4.4.1 |
|||||||
#5
|
|||||||
|
|||||||
Re: Best Sellers WITH OUT Advanced Statistics
Can you tell me: does this present the number of orders with a certain item, or the actual number of units sold in the period? Thanks.
__________________
-GMADMIN- Xcart 4.0.18 |
|||||||
#6
|
|||||||
|
|||||||
Re: Best Sellers WITH OUT Advanced Statistics
Can anyone who has tried this mod comment on the performance versus using the stock best sellers module (with advanced statistics)?
Thanks!
__________________
X-Cart Gold v4.1.10 [unix] AOM, Special Offers, CDSEO Pro, Remember Anon Carts, Back-In-Stock Notifications, MM3, Feed Manager |
|||||||
#7
|
|||||||
|
|||||||
Re: Best Sellers WITH OUT Advanced Statistics
Does anybody know how to include thumbnails with the bestsellers?
Thanks!
__________________
X-Cart 4.0.12 Heavy modified with paid, free and forum mods. PHP 5.2.5 | MYSQL 5.0.51a |
|||||||
#8
|
|||||||
|
|||||||
Re: Best Sellers WITH OUT Advanced Statistics
Can this script be modified to exclude categories from best sellers?
__________________
/erik daugbjerg/ X-Cart 4.6.6 |
|||||||
#9
|
|||||||
|
|||||||
Re: Best Sellers WITH OUT Advanced Statistics
It works fine in 4.1.9 and doesn't slow down the site since you don't need to turn on the advanced statistics. The difference compared the default bestsellers is that this one just show the main bestsellers. X-cart can show bestsellers in different categories. If I go to category B it will show bestseller from that category. This one won't do that and perhaps you don't want it to either...
|
|||||||
#10
|
|||||||
|
|||||||
Re: Best Sellers WITH OUT Advanced Statistics
Quote:
That sums it up pretty well. Good performance, especially versus the default functionality that uses advanced stats, but not much in the way of features. It would be nice to see a mod that provided similar performance and the ability to configure additional features, such as choosing to show best-sellers by category.
__________________
X-Cart Gold v4.1.10 [unix] AOM, Special Offers, CDSEO Pro, Remember Anon Carts, Back-In-Stock Notifications, MM3, Feed Manager |
|||||||
|
|||
X-Cart forums © 2001-2020
|