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)
-   -   Add to cart button products.tpl (https://forum.x-cart.com/showthread.php?t=1417)

moonchild 02-06-2003 03:44 PM

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.

funkydunk 02-22-2003 01:05 AM

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


<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>
Product Out of stock


Obviously change the layout etc according to your req's :wink:

All times are GMT -8. The time now is 03:51 AM.

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