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)
-   -   Adding price and description to related_products.tpl (https://forum.x-cart.com/showthread.php?t=21946)

NightFire 05-20-2006 10:14 AM

Adding price and description to related_products.tpl
 
Hi all,

I'm trying to get the product price and product describtion into my related_products.tpl
Till now I've only got the thumbnail and the product title in it (source: completed mods and templates forum: http://forum.x-cart.com/viewtopic.php?t=14995)

/modules/Upselling_Products/related_products.tpl
Code:

{* $Id: related_products.tpl,v 1.7.6.1 2004/12/06  svowl Exp $ *}
{if $product_links ne ""}

{capture name=dialog}
{assign var="tmp" value="0"}

{section name=cat_num loop=$product_links}
{if $product_links[cat_num].productid}{assign var="tmp" value="1"}{/if}
{/section}

{section name=cat_num loop=$product_links}

{ if %cat_num.first% }
<table border=0 cellspacing=5 width=100%>
{/if}

  {if $smarty.section.cat_num.index is div by 3}
    </tr><tr valign="top">
  {/if}

<td width="250" align="center">
{include file="product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=$config.Appearance.thumbnail_width product=$product_links[cat_num].product tmbn_url=$product_links[cat_num].tmbn_url}




<a href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>
<span class="ProductTitle">{ $product_links[cat_num].product|escape}</span>
</a></td>
{ if %cat_num.last% }
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra="width=100%"}
{/if}


Any help would be really appreciated
Unfortunately I can't get this done. :roll:

Edit: After searching a long time on the forum. [Damm search function gives too much results everytime.] I found a way to include the price into the related products. The only thing left: how to include the short description...

Thanks.

balinor 06-03-2006 03:36 AM

Did you read that full thread? You need to make some adjustments to your php file to get the description to show.


All times are GMT -8. The time now is 11:09 AM.

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