Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Add to cart button products.tpl
 
Reply
   X-Cart forums > X-Cart 4 > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-06-2003, 03:44 PM
 
moonchild moonchild is offline
 

Newbie
  
Join Date: Feb 2003
Posts: 4
 

Default Add to cart button products.tpl

Anyone know how to add a add to cart button on the products.tpl page that says out of stock when the item is out of stock.
Reply With Quote
  #2  
Old 02-22-2003, 01:05 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Try putting this where you want the form/add to cart to be:

Code:
<form name=orderform_{%product.index%} method=post action="cart.php?mode=add"> <td align=left> {if $products[product].avail eq "Y"} <a href="javascript: document.orderform_{%product.index%}.submit[/i]()"> {include file="buttons/add_to_cart.tpl"}</a> <input type=hidden name=amount value=1> <input type=hidden name=mode value=add> <input type=hidden name=productid value="{$products[product].productid}"> <input type=hidden name=cat value="{$smarty.get.cat}"> <input type=hidden name=page value="{$smarty.get.page}"> <a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}>See Details</a> {else} Product Out of stock {/if} </td> </form>

Obviously change the layout etc according to your req's
__________________
ex x-cart guru
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:46 PM.

   

 
X-Cart forums © 2001-2018