X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   If Statement Help Needed (https://forum.x-cart.com/showthread.php?t=40702)

photo 06-24-2008 06:31 AM

If Statement Help Needed
 
I am using the following if statement but would like to add other categories to it so that it would show in catagory 6 and 12. What is the proper way to do this?
Code:

{if $product.categoryid eq "6"}{/if}

Thanks

carpeperdiem 06-24-2008 06:54 AM

Re: If Statement Help Needed
 
Quote:

Originally Posted by photo
Code:

{if $product.categoryid eq "6"}{/if}

Code:

{if $product.categoryid eq "6" or $product.categoryid eq "12"}
Do This
{/if}


CAN YOU USE this instead?

Code:

{if $cat eq "6" or $cat eq "12"}

photo 06-24-2008 07:12 AM

Re: If Statement Help Needed
 
Thanks Jeremy, that worked. It ended up looking like this,

Code:

{if $cat eq "7" or $cat eq "8" or $cat eq "9" or $cat eq "12"}

hopefully this is the most efficient method.


All times are GMT -8. The time now is 06:48 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.