| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Display Out of Stock message in product_t.tpl | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Just wondering if there is a way to display if a product is out of stock on the product_t page.
Thanks |
|||||||
#2
|
|||||||
|
|||||||
![]() Sure, just take a look at the code in customer/main/product.tpl and use something similar on customer/main/products_t.tpl.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() 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. |
|||||||
#4
|
|||||||
|
|||||||
![]() 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.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
![]() That's brilliant. Thanks for your help.
![]() |
|||||||
#6
|
|||||||
|
|||||||
![]() On 4.2, I got this to work by using:
{if $product.avail le 0}Out of Stock{else}In Stock{/if}
__________________
X-Cart Gold 4.2.0 |
|||||||
|
|||
X-Cart forums © 2001-2020
|