gjh42:
Will do, Tim. First, the logic to include other categories/subcategories in this list:
(!ereg("(^1$|^1_)",$cPath))
You can find a full description of the PHP function ereg() in online tutorials like w3schools. For present purposes, there are three elements to understand.
^1$ means"the string is exactly 1".
^1_ means "the string starts with 1_".
| means "or".
And of course $cPath is the variable that holds the current category path, visible in the address bar.
For any top category (##) with or without subcategories, ^##$ will specify that top category.
For any top category with subcategories, ^##_ will specify all of its subcategories (and sub-subs etc.).
One step more detailed, for any subcategory (23_42), ^23_42$ will specify only that subcategory. THis can be extended as desired.
You can string any number of these specifications together with | between them, and if any one of them is true, ereg will return true.
Since in this case we want to execute if not in these categories, we add ! in front of ereg which says "f ereg is false, return true; if ereg is true, return false".
THis bit of logic can be embedded in any PHP statement where true or false is being evaluated on a category/product page.
:shocking: is that something I have to understand TOO!!!
I knew, when I 'finished" my store in less then a week, it was too good to be true!:unsure:
If you're online and have some time, please email me and let me know if you have any sort of IMs. If I can just wrap my blonde brain around it, I will get it eventually. I'm just SOOOO scared to mess with what is already working that it kept me awake all last night .
I try to calm down, we have new kittens in the house, so I go and hold one, but the minute I live the "nursery", I break out in a cold sweat cause I'm worried about getting this to work correctly.
I was so happy that I thought all I had to do was just start adding stock.... I was wrong :(.
I'm going to go read over your posts (again and again) and see if anything starts to gel.
Thanks!
Lalla
www.LilleyPadGifts.com
www.NothingButRomance.com