View Single Post
  #1  
Old 09-12-2006, 04:53 PM
 
instink instink is offline
 

Advanced Member
  
Join Date: Aug 2006
Posts: 44
 

Default Quick help with Buy Now button pls.. page error!

Hi guys, there is a mod in the completed section for making the recommended products listing more intuitive. I am using it with some modifications on 4.0.16 and it looks great, like this:

http://www.jctech.com.au/images/related.jpg

The only problem is the Buy Now button doesn't work. IE gets an error that says:

Error: Object doesn't support this property or method

The entire code for my related_products.tpl is:

Code:
{* $Id: related_products.tpl,v 1.7.6.1 2004/07/15 10:28:54 svowl Exp $ *} {if $product_links ne ""} {capture name=dialog} <table width="100%" border=0 cellpadding="0" cellspacing=0> {section name=cat_num loop=$product_links} <tr class="ItemsList"> <td width="70" align=center valign=top> {include file="product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=60} </td> <td align=top valign=top> <table border=0 cellspacing=5 width="100%"> <table> <tr valign="middle"> <td align=top width="100%"> <tr valign="middle"> <td align=top> <b> <A href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}> { $product_links[cat_num].product} </A> </b> <br>{$product_links[cat_num].descr} {$lng.lbl_our_price}: {include file="currency.tpl" value=$product_links[cat_num].price}</font> <font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product_links[cat_num].price}</font> </b> </td> <td align=right> {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" productid=$product_links[cat_num]} {/if} </td> </tr> <tr> <td valign=top> </td> <td colspan="3" align="right" valign=top> </td> </tr> </table> </td></tr> <tr class="ItemsList"> <td colspan="5" align=center valign=top><hr></td> </tr> {/section} </table> {/capture} {include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra="width=100%"} {/if}

The problem is in this line:

Code:
{include file="customer/main/buy_now.tpl" productid=$product_links[cat_num]}


But for the life of me I can't figure out how to fix it... I have tried so many combinations of variants in that line its not funny, but I just cannot get it to work... PLEASE help, this should be a simple thing to do but I am a noob! thanks!
__________________
X-cart 4.0.16
www.jctech.com.au
Reply With Quote