tozi Posted January 19, 2015 Share Posted January 19, 2015 (edited) Hi all, i have this code in product.tpl {if $product->upc>=1} {if $product->upc==1} in stock! {elseif $product->upc==2} 2 days {elseif $product->upc==3} 3 days {elseif $product->upc==4} 4 days {elseif $product->upc==12} 1-2 days {elseif $product->upc==13} 1 - 3 days {elseif $product->upc==35} 3-5 days {elseif $product->upc==25} 2-5 days {elseif $product->upc==0} {/if} This code show product delivery time. But i need instead UPC view the results of field references. I tried this: but didnt work. {if $product->upc>=1} {if $product->reference==1} in stock! {elseif $product->reference==ns1} 2 days {elseif $product->reference==ns} 3 days {elseif $product->reference==4} 4 days {elseif $product->reference==12} 1-2 days {elseif $product->reference==13} 1 - 3 days {elseif $product->reference==35} 3-5 days {elseif $product->reference==25} 2-5 days {elseif $product->reference==0} {/if} Any idea? Edited January 19, 2015 by tozi (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 19, 2015 Share Posted January 19, 2015 {elseif $product->reference==ns} "ns" is not integer so you have to use "ns" instead just ns Link to comment Share on other sites More sharing options...
tozi Posted January 19, 2015 Author Share Posted January 19, 2015 Thanks Miloš. Works great. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now