View Single Post
  #2  
Old 02-22-2008, 04:19 AM
  Holub's Avatar 
Holub Holub is offline
 

X-Adept
  
Join Date: Jan 2008
Posts: 432
 

Default Re: Bestsellers with short descriptions...

This is your new /skin1/modules/Bestsellers/menu_bestseller.tpl
I've correct some errors like
'thumbnailbs' -> 'thumbnail'
one excess {/if}

Code:
{capture name=bestsellers} <table cellpadding="0" cellspacing="2"> {foreach from=$bestsellers item=bestseller} <tr> {if $config.Bestsellers.bestsellers_thumbnails eq "Y"} <td width="30"> <a href="product.php?productid={$bestseller.productid}&amp;cat={$cat}"> {include file="product_thumbnail.tpl" productid=$bestseller.productid product=$bestseller.product tmbn_url=$bestseller.tmbn_url}</a> </td> {/if} <td> <b><a href="product.php?productid={$bestseller.productid}&amp;cat={$cat}">{$bestseller.product}</a></b><br /> {$bestseller.descr}<br /> {$lng.lbl_our_price}: {include file="currency.tpl" value=$bestseller.taxed_price}<br /> </td> </tr> {/foreach} </table> {/capture} {include file="dialog.tpl" title=$lng.lbl_bestsellers content=$smarty.capture.bestsellers extra='width="100%"'}

and this is your LAST 20 ROWS of your new /modules/Bestsellers/bestsellers.php. You should find row with 'if ($threshold)' and replace it to end of file with

Code:
if ($threshold) $threshold -= 1; $search_query['where'][] = " $sql_tbl[products_categories].categoryid IN ('".implode("','", $cat_ids)."')"; unset($result); } # # Search the bestsellers # $search_query['where'][] = "$sql_tbl[products].views_stats > '0' AND $sql_tbl[products].sales_stats >= '".$threshold."'"; $search_query['fields'][] = "xcart_products.descr"; $bestsellers = func_search_products($search_query, @$user_account["membershipid"], "$sql_tbl[products].sales_stats DESC, $sql_tbl[products].views_stats DESC", $config["Bestsellers"]["number_of_bestsellers"] ); $smarty->assign("bestsellers", $bestsellers); ?>

Enjoy!
__________________
Regards,
Anthony Holub

X-Cart Skins Store
- twenty two different skins available;
- both 4.1.x and 4.2.x versions compatible;
- refresh you store now!

Smart menu X-Cart add-on
Featured Products Slide Show X-Cart add-on
"What's New?" FREE X-Cart add-on
Reply With Quote