| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
find category id and parent cat id | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I want to add/remove stuff on the product detail page based on the category id
so I have {if ($current_category.categoryid != 23) } do this But it's not working I really need to do this for cat 23 and all it's children. Is there a way to say if "parent category is 23) do this ? This way client can add more subcats w/o having to change code. thanks DonnaNJ XC4.5
__________________
Version 4.6.1 + Mobile 1.4.1 |
|||||||
#2
|
|||||||
|
|||||||
![]() This works for the prod category
But I'd still like to do it for a cat and all the childres {if $product.categoryid != 23 }
__________________
Version 4.6.1 + Mobile 1.4.1 |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Does this thread help?
|
|||||||||
#4
|
|||||||
|
|||||||
![]() I tried to add the code
{assign var=myCats value=","|explode:"22,23,25,35"} {if in_array($catid, $myCats)} but it completely breaks the template ? Am I missing something ?
__________________
Version 4.6.1 + Mobile 1.4.1 |
|||||||
#5
|
|||||||||
|
|||||||||
![]() I'm guessing the error has to do with not liking "explode". This explains that situation. I add something like this to the end of postauth.php:
PHP Code:
|
|||||||||
|
|||
X-Cart forums © 2001-2020
|