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

Best Sellers on Static Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-10-2008, 09:40 AM
  abeight's Avatar 
abeight abeight is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Cleveland, OH
Posts: 479
 

Default Best Sellers on Static Page

I want to create a static page that lists the best sellers, but the items aren't showing up. I assume that a tweak needs to be made to the bestsellers.php file, but I have no idea where to begin. Has anyone done this before?

My static page is using this code:

{if $active_modules.Bestsellers ne "" and $config.Bestsellers.bestsellers_menu ne "Y"}
{include file="modules/Bestsellers/bestsellers.tpl"}
{/if}

Version 4.1.8

Thanks!
__________________
~ Andrea Beight
Reply With Quote
  #2  
Old 01-10-2008, 09:47 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Best Sellers on Static Page

This should do the trick.

Open pages.php

FIND:

Code:
# Assign the current location line $smarty->assign("location", $location);

BEFORE ADD:

Code:
if ($active_modules["Bestsellers"]) include $xcart_dir."/modules/Bestsellers/bestsellers.php";

In your static page use:

Code:
{if $active_modules.Bestsellers ne ""} {include file="modules/Bestsellers/bestsellers.tpl"} {else} Provide a disabled message. {/if}
Reply With Quote

The following user thanks Jon for this useful post:
presson83 (09-15-2009)
  #3  
Old 01-10-2008, 10:00 AM
  abeight's Avatar 
abeight abeight is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Cleveland, OH
Posts: 479
 

Default Re: Best Sellers on Static Page

Thanks so much, Jon! That did the trick.
__________________
~ Andrea Beight
Reply With Quote
  #4  
Old 05-10-2008, 03:50 AM
 
scraps scraps is offline
 

Advanced Member
  
Join Date: Mar 2004
Posts: 60
 

Default Re: Best Sellers on Static Page

Thank You, nice addon...

Is there a way to have this show additional Best Sellers on this page with the sidebox remaining at the amount set in admin?
__________________
Marian
Host: Successful Hosting
X-Cart version 4.1.9
PHP 4.3.10
MySql 4.0.22-standard
Web server Apache 1.3.33 (Unix)
Operating system Linux
Perl 5.8.3
http://www.seamstobesew.com
Reply With Quote
  #5  
Old 03-17-2009, 12:10 PM
  MsBecky's Avatar 
MsBecky MsBecky is offline
 

Member
  
Join Date: Jul 2008
Location: California
Posts: 22
 

Question Re: Best Sellers on Static Page

Quote:
Originally Posted by Jon
This should do the trick.

Open pages.php

FIND:

Code:
# Assign the current location line $smarty->assign("location", $location);

BEFORE ADD:

Code:
if ($active_modules["Bestsellers"]) include $xcart_dir."/modules/Bestsellers/bestsellers.php";

In your static page use:

Code:
{if $active_modules.Bestsellers ne ""} {include file="modules/Bestsellers/bestsellers.tpl"} {else} Provide a disabled message. {/if}

Hi Jon,
I'm using this tip, but the "best sellers" are displaying in 1 single column. Any suggestions, on how to make them display 3 across?

Any help would be greatly appreciated =)
Thanks, Becky
__________________
X-Cart Gold 4.1.10
Mods: BCS Engineering, Cart-Lab, FireTankSoftware, WebsiteCM
Hosting: EWDHosting.com (These Folks Are The Best!)

================================================
THE LITTLE BEAN COFFEE CO.
Fresh Handcrafted Artisan Coffee & Tea,
Specialty Beverages, and Gourmet Food
================================================

Experience The Little Bean╝ Difference!
www.thelittlebean.com | 1-888-848-BEAN (2326)

"Behind every successful woman is a substantial amount of coffee"
Reply With Quote
  #6  
Old 03-17-2009, 01:00 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Best Sellers on Static Page

Not sure off hand but you could try:

[code]
{if $active_modules.Bestsellers ne ""}
{include file="customer/main/products_t.tpl" products=$bestsellers}
{else}
Provide a disabled message.
{/if}
[/code[
Reply With Quote

The following user thanks Jon for this useful post:
MsBecky (03-18-2009)
  #7  
Old 04-16-2009, 08:46 AM
 
jimeu jimeu is offline
 

Newbie
  
Join Date: Jun 2003
Posts: 8
 

Default Re: Best Sellers on Static Page

work fine on 4.2, only doing the first 2 steps.

Open pages.php

FIND:
Code:
# Assign the current location line $smarty->assign("location", $location);

BEFORE ADD:

Code:
if ($active_modules["Bestsellers"]) include $xcart_dir."/modules/Bestsellers/bestsellers.php";

no need for anything else on 4.2

many thanks

jimeu
ver 4.2
__________________
Jaime Gabay
Reply With Quote
  #8  
Old 02-04-2011, 03:07 AM
 
mekon mekon is offline
 

Senior Member
  
Join Date: Jan 2011
Posts: 180
 

Default Re: Best Sellers on Static Page

Sorry to reopen this thread, but i've done the above..got the bestsellers working on the static page..but its now on the home page and category pages too. Any ideas?
__________________
------------------------------------------------

Darren
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 11:59 AM.

   

 
X-Cart forums © 2001-2020