![]() |
Display Out of Stock message in product_t.tpl
Just wondering if there is a way to display if a product is out of stock on the product_t page.
Thanks |
Re: Display Out of Stock message in product_t.tpl
Sure, just take a look at the code in customer/main/product.tpl and use something similar on customer/main/products_t.tpl.
|
Re: Display Out of Stock message in product_t.tpl
Quote:
I've tried that already and the only results I seem to be able to acheive is a blank page or every product displaying as sold out. I don't really understand the code enough to copy the correct bit. |
Re: Display Out of Stock message in product_t.tpl
Well you can't copy it directly, as the code for the product page and the products pages are different. A simple way is to just add this bit of code which will display an in-stock or out of stock message:
{if $products[product].avail le 0}Out of Stock{else}In Stock{/if} You can use the same {if} statement to hide the price or buy now button as well. |
Re: Display Out of Stock message in product_t.tpl
That's brilliant. Thanks for your help. :mrgreen:
|
Re: Display Out of Stock message in product_t.tpl
On 4.2, I got this to work by using:
{if $product.avail le 0}Out of Stock{else}In Stock{/if} |
All times are GMT -8. The time now is 04:38 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.