![]() |
Modified product.tpl shows qty in stock with options
Strange one this...
I have made modifications to product.tpl in order to show an 'in stock' icon if qty greater than 10 and a 'special order item' if below this. It works great and primarily was developed to reduce the number of potential missed updates as stock comes in and out, therefore less p***ed off clients. The mods themselves are seperate templates with a simple {if} {else} setup to control their display. Problem is, if i try to apply options to the product, the modification disappears and is replaced by the quantity in stock in unformatted text! Any idea what this might be? |
Are your if statements inside any of the if statements related to product options?
|
PM sent containing product.tpl
|
Please keep the discussion to the thread itself. Thanks :)
|
Did you get anywhere with this mod??
Im wanting something like this that rather than actually showing stock levels to customers shows "In Stock" or "Back Order" if its not in stock. |
that's what i've done, just doesn't work if product has options
|
So it only works if it has variants??
could you send me the product.tpl for me to have a gander at? |
no, it only works if product has NO variants.
Simply add this code: Code:
{if $product.avail gt 10}Stock Item - this item usually ships within 24 hours{else}Special Order Item - this item is supplied 'to order' and carries a lead time of 7 - 10 days, for more information contact us{/if} This is a simplified version of what I have in place[/code] |
Thanks for that, but hey guess what I do have variants and just cant seem to get anywhere with it.
Thought it would be simple to do seen as if you have more than one then display IN STOCK and if you have less than 1 OUT OF STOCK but whatever i try i just cant seem to get anywhere with it. |
All times are GMT -8. The time now is 07:46 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.