Page 6 of 9 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 83
  1. #51
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: How to hide categories with no active products

    Quote Originally Posted by ajeh View Post
    you guys are welcome ...

    While i would consider the loss of spiders not finding the category when disabled and good category description can help get the products spidered ... I can also see the desire for this feature ...

    But, to each their own, hence the switch ...
    exactly!!!!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #52
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: How to hide categories with no active products

    Quote Originally Posted by Ajeh View Post
    You guys are welcome ...

    While I would consider the loss of spiders not finding the Category when disabled and good Category description can help get the Products spidered ... I can also see the desire for this feature ...

    But, to each their own, hence the switch ...
    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. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #53
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: How to hide categories with no active products

    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 :-)

  4. #54
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How to hide categories with no active products

    Site Map appears to be working ... did you fix this?

    If so, what was your error?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #55
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: How to hide categories with no active products

    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.

  6. #56
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How to hide categories with no active products

    Good news ... I did that right for v16 ... Bad news ... I wrote that wrong for what I posted as you discovered ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #57
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: How to hide categories with no active products

    Quote Originally Posted by Ajeh View Post
    Good news ... I did that right for v16 ... Bad news ... I wrote that wrong for what I posted as you discovered ...
    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.
    Last edited by mikeel100; 25 Nov 2014 at 04:08 AM. Reason: Answer Ajeh question

  8. #58
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: How to hide categories with no active products

    While we are looking at the sitemap file...can you tell me why "All Products" doesn't show up on the sitemap?

  9. #59
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: How to hide categories with no active products

    FYI...all of Ajeh's mods mentioned above work in 1.5.5. Tested and confirmed during my upgrade.

  10. #60
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: How to hide categories with no active products

    if (CATEGORIES_PRODUCTS_INACTIVE_HIDE == 1 && zen_count_products_in_category((int)$categories->fields['categories_id']) == 0) {
    //skip empty or status off categories
    continue;
    }
    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.

    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.
    Last edited by mikeel100; 4 Jul 2016 at 07:04 PM. Reason: fix code

 

 
Page 6 of 9 FirstFirst ... 45678 ... LastLast

Similar Threads

  1. v150 how do i hide sub categories with no products listed
    By alibaba99 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Jan 2017, 06:19 PM
  2. Hide Categories with 0 Products
    By Semenek in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 4 Sep 2010, 05:44 PM
  3. Hide categories/subcategories with no products
    By earthone in forum Basic Configuration
    Replies: 0
    Last Post: 22 Jul 2010, 09:38 PM
  4. Active products in categories box
    By ouxly40 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 Sep 2007, 11:46 AM
  5. How to hide sub-categories with no active products?
    By donplay in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 29 Aug 2007, 08:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR