View Single Post
  #3  
Old 02-28-2005, 12:26 AM
 
artinion artinion is offline
 

Advanced Member
  
Join Date: Feb 2005
Location: Bangkok, Thailand
Posts: 37
 

Default RE: "Buy Now" button without the "Quantity&qu

I got it. Thanks. This is the code from "customer/main/buy_now.tpl".

Art

Code:
{* $Id: buy_now.tpl,v 1.8.2.2 2004/12/09 12:42:16 max Exp $ *} {if $js_enabled} <table border=0 width=100% cellpadding=0 cellspacing=0> {if ($active_modules.Product_Options ne "" and $product.product_options) or $product.price eq 0} <tr> <td height=25> <a href="product.php?productid={$product.productid}&cat={$cat}&page={$smarty.get.page|escape:"html"}">{include file="buttons/buy_now.tpl" style="button"}</a> </td> <td></td> <td></td> </tr> {else} <FORM name="orderform_{$product.productid}_{$product.add_date}" method=post action="cart.php?mode=add"> <input type=hidden name=productid value="{$product.productid}"> <input type=hidden name=cat value="{$smarty.get.cat|escape:"html"}"> <input type=hidden name=page value="{$smarty.get.page|escape:"html"}"> <tr> {if $product.distribution eq ""} <td height=25 width=5% nowrap>{$lng.lbl_quantity} </td> <td width=15%> {if $config.General.unlimited_products ne "Y" and ($product.avail le 0 or $product.avail lt $product.min_amount)} {$lng.txt_out_of_stock} {else} {if $config.General.unlimited_products eq "Y"} {math equation="x+1" assign="mq" x=$config.Appearance.max_select_quantity} {else} {math equation="x/y" x=$config.Appearance.max_select_quantity y=$product.min_amount assign="tmp"} {if $tmp<2} {assign var="minamount" value=$product.min_amount} {else} {assign var="minamount" value=1} {/if} {math equation="min(maxquantity+minamount, productquantity+1)" assign="mq" maxquantity=$config.Appearance.max_select_quantity minamount=$minamount productquantity=$product.avail} {/if} <input type=hidden name="amount" value="1"> {/if} </td> {else} {/if} <td> </td> </tr> <tr> <td> <input type=hidden name=mode value=add> {include file="customer/main/product_prices.tpl"} {if $config.General.unlimited_products eq "Y" or ($product.avail gt 0 and $product.avail ge $product.min_amount)} {if $js_enabled} <a href="javascript: document.orderform_{$product.productid}_{$product.add_date}.submit()">{include file="buttons/buy_now.tpl" style="button"}</a> {if $login ne "" and $active_modules.Wishlist ne ""} <a href="javascript:document.orderform_{$product.productid}_{$product.add_date}.mode.value='add2wl'; document.orderform_{$product.productid}_{$product.add_date}.submit()">{include file="buttons/add_to_wishlist.tpl" style="button"}</a> {/if} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_add_to_cart} {/if} {/if} </FORM> {if $product.min_amount gt 1} </td> </tr> <tr> <td><FONT class=ProductDetailsTitle>{$lng.txt_need_min_amount} {$product.min_amount} {$lng.lbl_items}</FONT> </td> </tr> {/if} {/if} </table> {/if}
__________________
X-Cart v. 4.0.12 Gold
Linux, Apache, MySQL, PHP 4
Reply With Quote