View Single Post
  #5  
Old 12-10-2009, 05:16 AM
  just_me's Avatar 
just_me just_me is offline
 

Advanced Member
  
Join Date: Oct 2005
Location: Spain
Posts: 69
 

Wink 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'
__________________
Cordially,
Just me
X-Cart Gold
Version 4.2.3
Multilingual shop: Spanish, French and US English
Reply With Quote