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

How to display best sellers in a static page?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-11-2010, 08:11 PM
 
almatesic almatesic is offline
 

Member
  
Join Date: Jul 2010
Posts: 12
 

Default How to display best sellers in a static page?

Not sure if i'm in the right category but I am stumped with this one. I am trying to display the bestsellers in a static page i created through the admin area. I have opened pages.tpl and placed the following code on the page...

{if $active_modules.Bestsellers}
{include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}

It displays in the categories page, home page, etc.. However it doesn't show up in a static page.

Not sure what i'm doing wrong but I am completely stuck here. I would think that code would work. I do have the Bestsellers module actived too.

Please help and thanks in advance for the help.
__________________
Albino D. Matesic
--------------------
x-cart version 4.3.2
Reply With Quote
  #2  
Old 07-12-2010, 12:31 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: How to display best sellers in a static page?

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}

This is for version 4.1.x..

__________________
4.6.1 Platinum


Reply With Quote
  #3  
Old 07-12-2010, 12:34 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: How to display best sellers in a static page?

Quote:
Originally Posted by almatesic
Not sure if i'm in the right category but I am stumped with this one. I am trying to display the bestsellers in a static page i created through the admin area. I have opened pages.tpl and placed the following code on the page...

{if $active_modules.Bestsellers}
{include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}

It displays in the categories page, home page, etc.. However it doesn't show up in a static page.

Not sure what i'm doing wrong but I am completely stuck here. I would think that code would work. I do have the Bestsellers module actived too.

Please help and thanks in advance for the help.

Please update your signature.In which version you want to use??
__________________
4.6.1 Platinum


Reply With Quote
  #4  
Old 07-12-2010, 04:10 AM
 
almatesic almatesic is offline
 

Member
  
Join Date: Jul 2010
Posts: 12
 

Default

I'm using x-cart 4.3.2.

So i've seen the thread with the three snippets of code provided to me in this thread but my page.tpl only has this code in it.

Code:
{* $Id: pages.tpl,v 1.10 2009/04/17 13:03:09 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} <h1>{$page_data.title}</h1> {capture name=dialog} {if $page_content ne ''} {if $config.General.parse_smarty_tags eq "Y"} {eval var=$page_content} {else} {$page_content} {/if} {/if} {/capture} {include file="customer/dialog.tpl" title=$page_data.title content=$smarty.capture.dialog noborder=true}

Am I missing something?
__________________
Albino D. Matesic
--------------------
x-cart version 4.3.2
Reply With Quote
  #5  
Old 07-12-2010, 04:16 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: How to display best sellers in a 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 try it on 4.3 versions.Always take backup of your original files.

Thanks
__________________
4.6.1 Platinum


Reply With Quote
  #6  
Old 07-12-2010, 04:34 AM
 
almatesic almatesic is offline
 

Member
  
Join Date: Jul 2010
Posts: 12
 

Default Re: How to display best sellers in a static page?

ok so i've done the following and this is still not displaying bestsellers at all...

Code:
{* $Id: pages.tpl,v 1.10 2009/04/17 13:03:09 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} <h1>{$page_data.title}</h1> {capture name=dialog} {if $page_content ne ''} {if $config.General.parse_smarty_tags eq "Y"} {eval var=$page_content} {else} {$page_content} {if $active_modules.Bestsellers} {include file="modules/Bestsellers/menu_bestsellers.tpl" } {/if} {/if} {/if} {/capture} {include file="customer/dialog.tpl" title=$page_data.title content=$smarty.capture.dialog noborder=true}
__________________
Albino D. Matesic
--------------------
x-cart version 4.3.2
Reply With Quote
  #7  
Old 07-12-2010, 04:49 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: How to display best sellers in a static page?

Follow the instructions just change in pages.php file and see the results I think no changes will required in pages.tpl ok..

If it works please let me know.Always take necessary backup of original files.
__________________
4.6.1 Platinum


Reply With Quote
  #8  
Old 10-21-2010, 12:34 PM
  RedandBlue's Avatar 
RedandBlue RedandBlue is offline
 

Senior Member
  
Join Date: Aug 2009
Posts: 170
 

Exclamation Re: How to display best sellers in a static page?

Hi, can you please tell my how to display all best sellers in one single page
like
mydomain.com/bestsellers.php


thanks for your time
__________________
rbgx
X-Cart 4.3.2
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 09:18 PM.

   

 
X-Cart forums © 2001-2020