exactly!!!!
Printable View
And as provided the switchis currently a simple on/off, it could even be expanded to a multi-level type switch to activate each of the above modifications differently. Though with the number of locations touched I would advise against trying to consider every potentiaal combination of settings as I would aalso guess that some shouldn't be disabled without another...
Anyways, just thinking about how far a "fix" can go. Like it though seems relatively simple. :)
Made changes as instructed above.
The Categories Sidebox has no categories showing...I think a closing bracket (}) is missing somewhere but not sure. I have 100,000 products in 2300+ categories with 11 top level categories. None are showing...just the Featured, All, New, and Specials Links.
Site Map - I get a 500 server error.
The center box area categories / subcategories appear to be working.
Category Tabs (top of main page) appears to be working.
I triple checked the code to make sure it is exactly as you suggested :-)
Site Map appears to be working ... did you fix this?
If so, what was your error? :lookaroun
The second correction to the Site Map file is using $categories_tab->field instead of $categories->field.
Changing it still didn't fix the sitemap issue.
Good news ... I did that right for v16 ... Bad news ... I wrote that wrong for what I posted as you discovered ... :blink:
I've been experimenting with the sitemap code but can't seem to get it to work. The logic seems like it is all there but apparently, I'm missing something.
I'm not really concerned with the sidebox or CatTab at this point as I have completely disabled all sideboxes and CatTabs...going for a simpler / cleaner look that is a little more user friendly on mobile devices.
So, should that second edit on the sitemap file be $categories or $categories_tab? $categories makes since to me since the query just above it is $categories.
Thanks.
To answer Ajeh's questions: Internal Server Error after waiting for about 2-3 minutes for the sitemap page to load.
While we are looking at the sitemap file...can you tell me why "All Products" doesn't show up on the sitemap?
FYI...all of Ajeh's mods mentioned above work in 1.5.5. Tested and confirmed during my upgrade.
FYI...If you remove the second code change(quote above) in the includes/classes/site_map.php file, the sitemap does hide the products without any quantities.Quote:
if (CATEGORIES_PRODUCTS_INACTIVE_HIDE == 1 && zen_count_products_in_category((int)$categories->fields['categories_id']) == 0) {
//skip empty or status off categories
continue;
}
Not sure what Ajeh was trying to accomplish with this other code...may affect something I am totally unaware of.
All of Ajeh's recommended code changes are working in 1.5.5a...sideboxes unknown since I do not use them.