X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Best Sellers on Static Page (https://forum.x-cart.com/showthread.php?t=36664)

abeight 01-10-2008 09:40 AM

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!

Jon 01-10-2008 09:47 AM

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}


abeight 01-10-2008 10:00 AM

Re: Best Sellers on Static Page
 
Thanks so much, Jon! That did the trick. :)

scraps 05-10-2008 03:50 AM

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?

MsBecky 03-17-2009 12:10 PM

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

Jon 03-17-2009 01:00 PM

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[

jimeu 04-16-2009 08:46 AM

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

mekon 02-04-2011 03:07 AM

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?


All times are GMT -8. The time now is 11:51 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.