Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Oct 2019
    Location
    UK
    Posts
    70
    Plugin Contributions
    0

    Default Browsing all products per category

    Hi

    As per the standard setup when you have categories (in our case book genres) and you select it then all manufacturers (authors) will be listed for selection.

    What I am wondering is - is there a plugin that can be installed that will enable a user to browse all products under a category irrespective of the manufacturer?

    For instance:

    Select THRILLER which may show 40 different authors to select from but a feature where selecting THRILLER will show ALL the books for all authors in that Genre.

    Hope that makes sense?

    Thanks in advance

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

    Default Re: Browsing all products per category

    Are you meaning that, a category holds all of the items that are desired to be displayed, but instead of them being displayed on a page-per-page fashion that they be displayed all at once?

    If that is the case, then change the setting for the maximum products to be listed by adjusting configuration->Maximum Values->Products Listing- Number Per Page to a value that matches or exceeds the number of product expected. Alternatively code can be modified to display the expected maximum value where the constant MAX_DISPLAY_PRODUCTS_LISTING is used on the catalog side to possibly account for the associated category or other criteria...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,140
    Plugin Contributions
    11

    Default Re: Browsing all products per category

    As you can see at enightlights.com, there is an extra category that puts all the items together by theme. You could have categories for authors, genres, paperback, hard cover, etc. Only one product starts this process and it is linked to as many categories as you want. The beauty is that any change only be made in the original to change all the places the product is displayed.

    This you create from the product itself. Info at https://docs.zen-cart.com/user/products/linked_product/

  4. #4
    Join Date
    Oct 2019
    Location
    UK
    Posts
    70
    Plugin Contributions
    0

    Default Re: Browsing all products per category

    Sorry been away for a while due to my mother being seriously ill.

    Just to clarify:

    Genre: Adventure

    Under that Authors, A, B and C

    So if a member selects Adventure then they get presented with select list A B or C.

    What they would like is to select Adventure and show all books by A B and C in a single request

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,681
    Plugin Contributions
    123

    Default Re: Browsing all products per category

    If authors A, B and C are categories under Adventure, you would have to use a plugin to see all products.
    If they are simply products under Adventure, you would see them by just navigating to the Adventure category (on the listing page for that category).
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Oct 2019
    Location
    UK
    Posts
    70
    Plugin Contributions
    0

    Default Re: Browsing all products per category

    Quote Originally Posted by swguy View Post
    If authors A, B and C are categories under Adventure, you would have to use a plugin to see all products.
    If they are simply products under Adventure, you would see them by just navigating to the Adventure category (on the listing page for that category).
    Thank you. Is there a plugin readily available that can draw down all books under a category irrespective of authors?

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,140
    Plugin Contributions
    11

    Default Re: Browsing all products per category

    I would think your best bet is to decide what the general main cat would be and enter all in there. Then, link some to adventure, some to mystery, some to Authors - A, etc. Take a look at https://enightlights.com to see they have suncatchers in one category and night lights in another. Then, all items by category.

    If you already have something different from above, you can always move the main product to another category. Once you have mains and links, updating a main will update all links.

    https://docs.zen-cart.com/user/products/linked_product/

  8. #8
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Browsing all products per category

    To be clear. It is perfectly possible to do the coding to include all the products in the parent category on the parent category page. I have done so on a number of sites although they are so highly modified I can't just copy and paste the code. But if you can code what you are going to want to do is construct a sql query (call it $listing_sql) and then call tpl_modules_product_listing.php .

    I am not sure if what SWGUY is saying is that there is an existing module in the repository. Just don't know.

  9. #9
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,681
    Plugin Contributions
    123

    Default Re: Browsing all products per category

    I'm saying what you are - you'd have to write code to do this. There may or may not be a mod - not sure. But it's not a part of the core, other than the linked products approach that @dbltoe suggested - but this would require a lot of maintenance since every time a product was added, it would have to be linked.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Browsing all products per category

    You said you're using v1.5.1, which is very old. I don't have a copy of that installed anywhere to test.

    So all I can offer is a hypothesis based on using code that appears to work on v1.5.7, but trying to indicate how to hack it into the older structure of v151.

    I figure there are two spots that need code changes. Note that these proposed changes will apply to ALL categories, not just to "some". You can put in your own restrictions by changing the code yourself.

    includes/index_filters/overrides/default_filter.php (or maybe your "book" site is using a different filter already. In that case apply your changes there, adapting accordingly).


    You'll need to insert come code above line 76 where $listing_sql begins,
    Code:
        $child_categories = array();
        zen_get_subcategories($child_categories, $current_category_id);
    and then change the highlighted line 84 to:
    Code:
        AND p2c.categories_id IN (" . implode(',', $child_categories) . ") " .
    /includes/modules/pages/index/header_php.php
    After the following section

    add:
    Code:
    $category_depth = 'products';
    Again: just guessing. This approach is kinda brash, and wide-sweeping. Your mileage may vary.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Not all products are listed in category 'all products'
    By jcdk in forum Basic Configuration
    Replies: 3
    Last Post: 15 Feb 2010, 09:07 AM
  2. Strange sub category problem while browsing products
    By canemasters in forum General Questions
    Replies: 10
    Last Post: 31 Aug 2009, 06:54 AM
  3. Products All Listing - How to have 'X' products shown per row
    By tqualizer in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 31 Jan 2008, 05:28 AM
  4. Coding advice... show Subcategories' products when browsing main category?
    By bodyjewelrystores in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 25 Dec 2007, 05:35 PM
  5. All products in a category on the screen while browsing.
    By PaulineNMU in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 21 Jul 2006, 04:04 AM

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