View Single Post
  #1  
Old 03-01-2004, 12:27 PM
 
salsabeel salsabeel is offline
 

Senior Member
  
Join Date: Jan 2004
Posts: 132
 

Default Detailed Recommends List

I am almost finished with a custom mod that shows details of the products that show up under the Recommends List. I only have one problem, which I hope you all can help me with, and that is I am unable to get it to display the price. Instead it says: "Enter your price !" as if the products have no prices. The description, product title, and image thumbnail works though. Here is the code:

Code:
{* $Id: recommends.tpl,v 1.3 2004/03/01 16:26:00 salsabeel Exp $ *} {if $recommends} {capture name=recommends} {section name=num loop=3} <table border=0 width=100%> <tr><td width=90 align=center valign=top> <a href=product.php?productid={$recommends[num].productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=$config.Appearance.thumbnail_width product=$recommends[num].product tmbn_url=$recommends[num].tmbn_url} {$lng.lbl_see_details}</a> </td> <td valign=top> {$recommends[num].product}</font> <font size=1> {$recommends[num].descr|truncate:300:"...":true} </font> <hr size=1 noshade width=230 align=left> {if $recommends[num].product_type eq "C"} <font class="FormButton">{$lng.lbl_details} {include file="buttons/go.tpl"}</font> {else} {if $active_modules.Subscriptions ne "" and $recommends[num].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $recommends[num].price ne 0} {if $recommends[num].list_price gt 0 and $recommends[num].price lt $recommends[num].list_price} {math equation="100-(price/lprice)*100" price=$recommends[num].price lprice=$recommends[num].list_price format="%d" assign=discount} <font class=MarketPrice>{$lng.lbl_market_price}: <s>{include file="currency.tpl" value=$recommends[num].list_price}</s></font> {/if} <font class=ProductPrice>{$lng.lbl_our_price}: {include file="currency.tpl" value=$recommends[num].price}</font> <font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$recommends[num].price}</font> {if $recommends[num].list_price gt 0 and $recommends[num].price lt $recommends[num].list_price}, {$lng.lbl_save} {$discount}%{/if} {if $config.Taxes.use_vat eq "Y" and $recommends[num].vat gt "0"}, {$lng.lbl_including_vat} {$recommends[num].vat}%{/if} {else} <font class=ProductPrice>{$lng.lbl_enter_your_price}</font> {/if} </td> <td colspan="3" align="right" valign=center> {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$recommends[num]} {/if}{/if} {/if} </td></tr> </table> {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra="width=100%"}{/if}

Thanks in advanced!
Reply With Quote