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)
-   -   How to display best sellers in a static page? (https://forum.x-cart.com/showthread.php?t=54570)

almatesic 07-11-2010 08:11 PM

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.

Learner 07-12-2010 12:31 AM

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..


Learner 07-12-2010 12:34 AM

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??

almatesic 07-12-2010 04:10 AM

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?

Learner 07-12-2010 04:16 AM

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

almatesic 07-12-2010 04:34 AM

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}



Learner 07-12-2010 04:49 AM

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.

RedandBlue 10-21-2010 12:34 PM

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


All times are GMT -8. The time now is 05:30 PM.

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