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)
-   -   Bestsellers Help (https://forum.x-cart.com/showthread.php?t=48197)

mrerotic 06-20-2009 09:51 PM

Bestsellers Help
 
How to display bestsellers horizontally? I would like 3 across. Any help would be much appreciated.

mrerotic 06-20-2009 09:52 PM

Re: Bestsellers Help
 
Also, how do you change the image size of the bestsellers?

fbcexpress 12-09-2009 10:55 PM

Re: Bestsellers Help
 
*Bump* I'm also trying to do this. Anyone?

Shiftlocked 12-10-2009 04:57 AM

Re: Bestsellers Help
 
Ive never been quite sure on the whole displaying best sellers, if you are being watched by your competition then it gives the game away.

Myself I prefer the flexibility of Feature Product Manager for xcart. Gives you a bit more of control of where you can place products on pages and really lets you goto town on promotion etc

just_me 12-10-2009 05:16 AM

Re: Bestsellers display
 
I made a mod for showing bestsellers horizontally and have it working in 4.2.3 version.

I made a revised version of bestsellers.tpl called bestsellers_r.tpl.

Code:

{*
$Id: bestsellers_r.tpl,v 1.13 2009/11/26 bestsellers in a row Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{if $bestsellers}
  {capture name=bestsellers}
    <table class="rproducts">
<tr>
{section name=cat_num loop=$bestsellers}
<td>
     
        {if $config.Bestsellers.bestsellers_thumbnails eq "Y"}
          <a href="product.php?productid={$bestsellers[cat_num].productid} cat={$cat} bestseller=Y">
{include file="product_thumbnail.tpl" productid=$bestsellers[cat_num].productid product=$bestsellers[cat_num].product tmbn_url=$bestsellers[cat_num].tmbn_url}</a>
            <div class="details">
              <a class="product-title" href="product.php?productid={$bestsellers[cat_num].productid} cat={$cat} bestseller=Y">{$bestsellers[cat_num].product|escape}</a><br />
              {$lng.lbl_our_price}: {include file="currency.tpl" value=$bestsellers[cat_num].taxed_price}
            </div>
            <div class="clearing"></div>
          {else}
            <a class="product-title" href="product.php?productid={$bestsellers[cat_num].productid} cat={$cat} bestseller=Y">{$bestsellers[cat_num].product|escape}1</a><br />         
          {/if}
</td>
      {/section}
</tr>
    </table>
  {/capture}
  {include file="customer/dialog_nosort.tpl" title=$lng.lbl_bestsellers content=$smarty.capture.bestsellers}
{/if}


Then I modified the code on subcategories.tpl located here:

/customer/main/subcategories.tpl

I just modified the file name to bestsellers_r.tpl.

Code:

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



See ya'
:D/

just_me 12-10-2009 05:18 AM

Re: Bestsellers Help
 
Quote:

Originally Posted by fbcexpress
*Bump* I'm also trying to do this. Anyone?


I just shared my mod code for this. Take a look at the thread.
O:)

fbcexpress 12-10-2009 04:07 PM

Re: Bestsellers Help
 
Thanks for sharing your code.. but its not working for us :(

We are running the same version of x-cart but it just gives us this error message -

Warning: Smarty error: unable to read resource: "customer/dialog_nosort.tpl" in ../xcart/include/lib/smarty/Smarty.class.php on line 1092

any ideas?

just_me 12-11-2009 01:24 AM

Re: Bestsellers in a row
 
Sorry 'bout that. I forgot that I made a new template called dialog_nosort.tpl under customer/ to remove the sorting feature which I found useless. Since as I only put 3 bestsellers, what's to sort?

Solution for you, change "customer/dialog_nosort.tpl" back to "customer/dialog.tpl"

You'll find this code at the bottom of the bestsellers_r.tpl
Code:

{/capture}
  {include file="customer/dialog_nosort.tpl" title=$lng.lbl_bestsellers content=$smarty.capture.bestsellers}
{/if}


and change it back to
Code:

{/capture}
  {include file="customer/dialog.tpl" title=$lng.lbl_bestsellers content=$smarty.capture.bestsellers}
{/if}


:-)


All times are GMT -8. The time now is 07:20 PM.

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