View Single Post
  #2  
Old 12-16-2002, 11:44 PM
 
funkydunk funkydunk is offline
 

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

Default

I totally agree - in the standard set up there are too many clicks needed to purchase.

Here is the codes to be added into the products.tpl template found in skin1/customer/main/

Code:
<form name=orderform_{%product.index%} method=post action="cart.php?mode=add"> a href="javascript: document.orderform_{%product.index%}.submit()"> {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}"> </form>

Put that in the template where you want it to appear on the listing adding in the appropriate html for your set up.

Your second question - I have built this option to show all the products on a separate page but I guess it could be adapted to show on the front page. It must only be used for relatively small numbers of products though else it weirds out. I will find and adapt the code and repost it.
__________________
ex x-cart guru
Reply With Quote