Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2006
    Posts
    96
    Plugin Contributions
    0

    Default Urgent: Subcategories don't display when products exist

    If you quickly browse a little in my cart here, then you'll see that whenever you navigate to a category that contains products, no subcategories are displayed. They can still be seen by referring to the sidebox on the left, but I really need to have then in the main window.

    Also it might be noted that when a category with no immediate products is opened, any subcategories there in are visible as they should be.

    This cart recently went live, please help!

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

    Default Re: Urgent: Subcategories don't display when products exist

    Categories should contain Categories ...

    --- OR ---

    Categories should contain Products ...

    Categories are NOT designed to contain both Categories and Products at the same time ...

    You will get display errors, search erros, price errors, etc.
    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!

  3. #3
    Join Date
    Jun 2006
    Posts
    96
    Plugin Contributions
    0

    Default Re: Urgent: Subcategories don't display when products exist

    Huh, thanks for the reply. I wasn't expecting that to be the case...this problem arises because I've transfered my entire Cube cart installation (which does use the subcat/product listing) functionality. It still seems that this would be a fairly simple modification, as the functionality exists to list both - I just need to do it at the same time.

    Anyone point me towards the correct files? Thanks again!

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

    Default Re: Urgent: Subcategories don't display when products exist

    You can do:
    PHP Code:
    Category
      Subcategory
        Product
        Product
      Subcategory
        Product
        Product
        Product
        Product
    Category
        Product
        Product
        Product
        Product
    Category
      Subcategory
        Product
        Product
        Product
        Product
      Subcategory
        Product
        Product
        Product
        Product
      Subcategory
        SubSubcategory
          Product
          Product
          Product
          Product
       Subsubcategory
          Product
          Product
    Category
        Product
        Product 
    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. #5
    Join Date
    Jun 2006
    Posts
    96
    Plugin Contributions
    0

    Default Re: Urgent: Subcategories don't display when products exist

    I understand the functionality, it just becomes a problem in that the entire structure of my cart (some 1500 items) is already in place, and I'd rather not sift through the entire thing trying to find subcat's for products I know little about. If I can avoid it....

    So, I'm thinking (probably naively) that since the cart can already list both, that my problem could be solved my copying the code that lists the subcategories (when no products are present), and pasting it in the code where products are listed. I'm currently pouring over code in he \includes\modules\product_listing.php file. Am I on the right track? Any tips?

    Already backed-up btw, so no worries there. Thanks!

  6. #6
    Join Date
    Jun 2006
    Posts
    96
    Plugin Contributions
    0

    Default Re: Urgent: Subcategories don't display when products exist

    Welp, I've tracked the sought functions to:

    \includes\templates\template_default\templates\tpl_index_product_list.php
    \includes\templates\template_default\templates\tpl_index_categories.php
    -and most importantly-
    \includes\modules\pages\index\main_template_vars.php

    The lfinal makes a call to either of the first two, depending on whether it wants to list products OR subcategories. I want it to do both, but the obvious revisions didn't work. It seems that when one is called the page is cleared before listing, so just calling both won't work. I tried commenting out a few lines here and there and juggled some code to no avail.

    Doesn't help that I know no php...

    I may seek another solution (reorganizing), but if anyone has any suggestions it would be greatly appreciated. Thanks once more.

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

    Default Re: Urgent: Subcategories don't display when products exist

    Do not mix Categories and Products into the same Category or you will be doomed ...

    See other post ...
    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!

 

 

Similar Threads

  1. v139h Google Indexing Products in sub categories that don't exist...Why..How??
    By kcb410 in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 8 Oct 2012, 03:12 PM
  2. Replies: 1
    Last Post: 20 Apr 2010, 04:33 AM
  3. Display all products in subcategories when category selected
    By paperboard in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 28 Oct 2009, 08:34 PM
  4. Replies: 8
    Last Post: 13 Dec 2008, 02:50 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