| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Product Category If Statement Not Working | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Product Category If Statement Not Working
I have this if statement on skin1/customer/main/product.tpl
{if $product.categoryid eq "1039"} All custom hoses are made to order and ship within 2 business days{/if} and it will not work but if I change it to {if $product.categoryid = "1039"} All custom hoses are made to order and ship within 2 business days{/if} I get a error. I realize I should have eq and not = . But the statement does show in the page. I have used this if statement like this for many sites but for some reason it will not show here. Any idea why? This is running on x cart 4.2.0
__________________
Cyber Matrix ------------------- X-Cart 4.1.9 |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Product Category If Statement Not Working
Have you tried without the quotes, just the number? I assume you are sure the categoryid is 1039. You should consider upgaring to the stable 4.2.x version though (4.2.0 was like a beta)
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Product Category If Statement Not Working
I tried without the quotes and it did not work. This is not making sense as I have used this format for an if statement on many sites and they all work. Not sure about upgrading because it has some customization for placing products in the cart.
__________________
Cyber Matrix ------------------- X-Cart 4.1.9 |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Product Category If Statement Not Working
Are you sure categoryid is 1039? You can list it for the product(s) in question - {$product.categoryid} - and see what the output is.
The upgrade to 4.2.3 is bug fixing upgrade, it will not mess up with any customizations you have, it is not like going to another branch
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|||
X-Cart forums © 2001-2020
|