| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Need to create an if statement using product IDs... | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hello,
I'd like to add some specific information to the page footer for a few products. In order to do this I need to know what the if statement is. I already know that for categories I would use: Code:
What would it be for individual products? Thanks, Jennifer
__________________
Jennifer Kirkpatrick X-Cart Pro Version 4.4.1 AND X-Cart Gold Version 4.1.9 |
|||||||
#2
|
|||||||
|
|||||||
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() Great, thanks.
One more question. When I use the category identifier as I mentioned above, it only works for products who have that as the main category. However, I have lots of products that are also assigned to several other categories (for example a baby blanket may have a main category of "baby blankets" but also be included in "baby shower gifts" and "personalized baby gifts"). Is there any way to say I want to do something to ALL products in a secondary category? Thanks, Jennifer
__________________
Jennifer Kirkpatrick X-Cart Pro Version 4.4.1 AND X-Cart Gold Version 4.1.9 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Hiya
Try something like this Code:
if you're referring to the $products array - use $products[product].categoryxx Lee [/b]
__________________
Why a mouse when it spins ...... X-Cart Gunslingers - For Hire!! http://forum.x-cart.com/viewtopic.php?t=8615 |
|||||||||
#5
|
|||||||
|
|||||||
![]() Thanks Lee but that didn't work. It still only displays the text if the product has been assigned to the main category.
Jennifer
__________________
Jennifer Kirkpatrick X-Cart Pro Version 4.4.1 AND X-Cart Gold Version 4.1.9 |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Jen
Post the code that you're trying to use here and I'll take a look Lee
__________________
Why a mouse when it spins ...... X-Cart Gunslingers - For Hire!! http://forum.x-cart.com/viewtopic.php?t=8615 |
|||||||||
#7
|
|||||||||
|
|||||||||
![]() use something like
Code:
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. ![]() ![]() |
|||||||||
#8
|
|||||||
|
|||||||
![]() How would I specify the category ID though? I need to be able to do this:
{if category1 = 345 or category2 = 345 or category3 = 345} Do something {/if} But I don't know how to refer to category1, category2, category3, etc. Thanks, Jennifer
__________________
Jennifer Kirkpatrick X-Cart Pro Version 4.4.1 AND X-Cart Gold Version 4.1.9 |
|||||||
#9
|
|||||||
|
|||||||
![]() Along this same line I'm also having problems specifying ONLY a category page.
I want to change the titles for the category pages so I used: Code:
__________________
Jennifer Kirkpatrick X-Cart Pro Version 4.4.1 AND X-Cart Gold Version 4.1.9 |
|||||||
|
|||
X-Cart forums © 2001-2020
|