Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Bestsellers on ALL pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 01-17-2004, 12:15 AM
  leon's Avatar 
leon leon is offline
 

X-Wizard
  
Join Date: Mar 2003
Location: Costa Rica
Posts: 1,213
 

Default Bestsellers on ALL pages

Its great to have Bestsellers in different categories (depending on their category), but it would be nice to have them also on all other pages and not only home.

Bestsellers is an eyecathing sales pitch, and currently they do not show up when on Product Details, Help, Specials, Cart, register and additional Static pages.

I would suggest the Bestsellers to pick up as shown on the HOME page to all previously mentioned pages as well.
__________________
It doesn\'t matter what is done... it is how it is done.
=============================
XCart Version: 3.5.3 -> Dmcigars.com
XCart Version: 4.1.3....
Reply With Quote
  #2  
Old 01-17-2004, 12:23 AM
  DataViking's Avatar 
DataViking DataViking is offline
 

eXpert
  
Join Date: Jan 2003
Location: Las Vegas, NV
Posts: 361
 

Default

I agree 100%
__________________
Web Design Web Design and Custom X-Cart Projects

http://www.dataviking.com

Mention the forums for discounts!
x-cart Version 4.1.8
Reply With Quote
  #3  
Old 01-24-2004, 04:14 PM
  leon's Avatar 
leon leon is offline
 

X-Wizard
  
Join Date: Mar 2003
Location: Costa Rica
Posts: 1,213
 

Default

Ok, I also found out how to get this done.

Just add this code:
Code:
if($active_modules["Bestsellers"]) include "../modules/Bestsellers/bestsellers.php";

right after require "./auth.php";, on all scripts for pages you want them to appear on.

Some pages to consider inserting this code (all under /customer directory):
- cart.php
- register.php
- help.php
- giftcert.php
- product.php
- error_message.php
- pages.php
- download.php
- search.php
__________________
It doesn\'t matter what is done... it is how it is done.
=============================
XCart Version: 3.5.3 -> Dmcigars.com
XCart Version: 4.1.3....
Reply With Quote
  #4  
Old 08-07-2004, 08:03 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Excellent post. Bump to move to Custom Mods please.
Reply With Quote
  #5  
Old 08-08-2004, 08:24 PM
 
pmstudios pmstudios is offline
 

Senior Member
  
Join Date: May 2004
Posts: 133
 

Default

I've wanted to do this too and it seems to work well by adding the following at the bottom of auth.php
Code:
if($active_modules["Bestsellers"]) @include_once "../modules/Bestsellers/bestsellers.php";

I actually haven't had any success with it showing up while browsing categories though, and it didn't make a difference by adding the include to every file.

edit: This should have been obvious before, but I just realized it works only if there's ordered products within the categories you're browsing.
__________________
X-Cart 4.0.5
MySQL: 3.23.58
PHP 4.3.2
Reply With Quote
  #6  
Old 08-14-2004, 06:46 AM
 
phwuser phwuser is offline
 

Newbie
  
Join Date: Apr 2004
Posts: 9
 

Default

Leon,

I've tried what you did but it does not work for me. I cannot even display "Bestsellers." I am also using the same version as you are. I purchased another cart from x-cart and it was 4.0.1. But, it did not display as well.

Patricia
Reply With Quote
  #7  
Old 08-14-2004, 06:01 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default

have you checked in modules section if best sellers option is enabled.
__________________
X-Cart Version 4.1.8
Hosted on Linux
Reply With Quote
  #8  
Old 08-26-2004, 05:48 AM
  leon's Avatar 
leon leon is offline
 

X-Wizard
  
Join Date: Mar 2003
Location: Costa Rica
Posts: 1,213
 

Default

raxitpatel is right, if you dont even have bestsellers appearing, its because you havent enabled the module yet, try that.
__________________
It doesn\'t matter what is done... it is how it is done.
=============================
XCart Version: 3.5.3 -> Dmcigars.com
XCart Version: 4.1.3....
Reply With Quote
  #9  
Old 08-28-2004, 05:45 AM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Guru
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 3,062
 

Default

I've done something similar on my site and have taken it a bit further. What I've done is if there are no best sellers available for that category, then I select the overall store bestsellers. That way your store look is uniform no matter what page you're on.

Just add this to modules/Bestsellers/bestsellers.php:

Code:
# BCSE if(empty($bestsellers)) { $threshold = 0; $search_query = "$sql_tbl[products].forsale='Y' and $sql_tbl[products].avail>0 and $sql_tbl[products].sales_stats > $threshold AND $sql_tbl[categories].avail='Y' and price>0 group by $sql_tbl[products].productid order by sales_stats DESC, views_stats DESC limit ".$config["Modules"]["number_of_bestsellers"]; $bestsellers = func_search_products($search_query, !empty($user_account['membership'])?$user_account['membership']:""); } # BCSE

Before:
Code:
$smarty->assign("bestsellers",$bestsellers);

I did this for 3.5.x

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #10  
Old 08-30-2004, 09:48 AM
  rjcbear's Avatar 
rjcbear rjcbear is offline
 

X-Adept
  
Join Date: Jun 2004
Location: Alabama,U.S.A
Posts: 503
 

Default

Carrie,

What file do we need to edit.

Kind regards,
Ricky
__________________
X-CART Gold version 4.0.14 & 4.1.11
Apache Version 1.3.29 (Unix)
EWDHosting-Quality X-cart Hosting
We will always sell you the right shoe and the left one is free.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:56 PM.

   

 
X-Cart forums © 2001-2020