![]() |
Ok I've sorted it out now. I'm using multiple templates for both products and catergories. Here is the products_t.tpl I played around with below just in case it's at all useful to anybody else and a little screen shot of how it renders.
http://www.wyzeshop.com/screenshot5.jpg Quote:
|
Zaja,
The code you so generously supplied is working like a charm, again thank you so much. But I have a little problem with it that I can't figure out. I'm sure it's a simple one - well I hope it's a simple one ;) The 'add to cart' button displays in product listings even if the item is out of stock. Is there a simple fix for this? Cheers, G Quote:
|
Try to replace:
Code:
<input type="button" value="{$lng.lbl_add_to_cart}" onclick="document.orderform_{$products[product].productid}_{$products[product].add_date}.submit();"> Code:
{if $product.avail gt 0} |
Quote:
Oooppps! Now everything is out of stock? |
I have changed the code, try again please.
|
Nope still out of stock?
Just in case i'm being a spaz here is my products_t.tpl Quote:
|
fixed, replace(in products.tpl):
Code:
{if $product.avail gt 0}Code:
{if $products[product].avail gt 0} |
You are officially THE man! 8)
It be workin' harder than a $5 hooker... Thanks so much bro ;) |
Quote:
8) :mrgreen: :wink: :) |
I don't wanna take the piss but would you also know the code for placing a form button that is linked to 'show product details'?
As i'm using custom templates I have different things set up all over the place. I'm having a problem as everything that is searched for displays using the same template containing the 'add to cart' button when some products require the customer to select options before hitting the buy button. I just want to replace the 'add to cart' button with a 'show details' button for the cat listings pulled from a search. |
| All times are GMT -8. The time now is 10:11 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.