Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Products Below Categories [Support Thread]

    This is the official support thread for the ZX Products Below Categories plugin.

    For those who want to download it before it is approved and available in the Plugins section, you can find it here.

    By default, Zen Cart does NOT allow products and subcategories to exist on the same level. This plugin retains that restriction, but allows you to display products after listing your subcategories. It does not move/copy/link your products - it leaves the category structure intact.

    This plugin will simply display all of the products from all matching subcategories right under the subcategories list. This allows the visitor to either browse all of your products in the top level category, or to narrow down the list by using subcategories.

  2. #2
    Join Date
    Oct 2009
    Posts
    298
    Plugin Contributions
    0

    Default Re: Products Below Categories [Support Thread]

    Thanks for your work on the balihr!

    I look forward to implementing this when it is available.

    Thanks again for your help with this,

    Jeff

  3. #3
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Products Below Categories [Support Thread]

    Approved and can be downloaded here

  4. #4
    Join Date
    Oct 2009
    Posts
    298
    Plugin Contributions
    0

    Default Re: Products Below Categories [Support Thread]

    Hi balihr,

    I have installed your module on my new v.1.5.8 and it works great! It now shows all of the products in the category instead of just showing each sub-category where customers then have to choose one of them. This is just what I was looking for!

    I have 2 tweaks I'd like to make....and was hoping that you'd be able to help.

    First you had mentioned that you could change/eliminate code to show not show the subcategories above the products. Would you be able to share what code to make this change to?

    Lastly, I have my categories displaying products by date descending. It appears now these specific categories that this plugin affects (only ones with subcategories) display the products by date ascending. I wasn't able to decipher the code change area to make this change. Could you shed some light on this?

    Thanks again for this valuable plugin and for your help.

  5. #5
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Products Below Categories [Support Thread]

    Quote Originally Posted by NWCE View Post
    Hi balihr,

    I have installed your module on my new v.1.5.8 and it works great! It now shows all of the products in the category instead of just showing each sub-category where customers then have to choose one of them. This is just what I was looking for!
    Glad to hear that!

    First you had mentioned that you could change/eliminate code to show not show the subcategories above the products. Would you be able to share what code to make this change to?
    You can edit your includes/templates/YOUR_TEMPLATE/templates/tpl_index_categories.php and simply find and comment the line that display subcategories.
    Code:
    // require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_row.php');
    Lastly, I have my categories displaying products by date descending. It appears now these specific categories that this plugin affects (only ones with subcategories) display the products by date ascending. I wasn't able to decipher the code change area to make this change. Could you shed some light on this?
    Is this is modification you made somewhere? How did you get your items to sort that way?

  6. #6
    Join Date
    Oct 2009
    Posts
    298
    Plugin Contributions
    0

    Default Re: Products Below Categories [Support Thread]

    Thanks for your reply and for the file to comment this particular line. That worked great!

    In order to get my categories to sort products by date descending I made the change in the includes/index_filters/default_filter.php

    In that file I changed this line

    $listing_sql .= " ORDER BY p.products_sort_order, pd.products_name";

    To this line

    $listing_sql .= " ORDER BY p.products_date_added desc, p.products_sort_order, pd.products_name";

    I had made this change prior to installing this Products Below Categories plug in and this sort order change worked. It is still working in my categories, except for the categories that have subcategories and is making this plug in take over.

    Any thoughts as to how to make this sort order apply to these categories as well??

    Thanks again for your help!

  7. #7
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Products Below Categories [Support Thread]

    Quote Originally Posted by NWCE View Post
    In order to get my categories to sort products by date descending I made the change in the includes/index_filters/default_filter.php

    In that file I changed this line

    $listing_sql .= " ORDER BY p.products_sort_order, pd.products_name";

    To this line

    $listing_sql .= " ORDER BY p.products_date_added desc, p.products_sort_order, pd.products_name";

    I had made this change prior to installing this Products Below Categories plug in and this sort order change worked. It is still working in my categories, except for the categories that have subcategories and is making this plug in take over.
    Yup, that's what I thought, but had to make sure.
    You'll need to make the same/similar change in includes/modules/pages/index/main_template_vars.php
    The simplest way is to add a line right after the beninging of the plugin's code on line 121
    From
    Code:
    if(PRODUCT_LISTING_SHOW_PRODUCTS_BELOW == 'true') {
          // create column list
          $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
    to
    Code:
    if(PRODUCT_LISTING_SHOW_PRODUCTS_BELOW == 'true') {
          $alpha_sort .= " ORDER BY p.products_date_added desc, p.products_sort_order, pd.products_name";
          
          // create column list
          $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,

  8. #8
    Join Date
    Oct 2009
    Posts
    298
    Plugin Contributions
    0

    Default Re: Products Below Categories [Support Thread]

    Thanks again for your reply and help!

    I have made this change and it now sorts by date descending......but it is now showing duplicate listings for each product. The other categories are fine....it is just the categories that have the subs in them.

    Any ideas??? (Checked, and nothing in the Logs folder)

  9. #9
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Products Below Categories [Support Thread]

    Are those products linked by any chance? Meaning showing in multiple subcategories of the parent category?

    Try includes/modules/pages/index/main_template_vars.php
    from
    Code:
    $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_image, p.products_tax_class_id, pd.products_name, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
    to
    Code:
    $listing_sql = "select distinct " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_image, p.products_tax_class_id, pd.products_name, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status

  10. #10
    Join Date
    Oct 2009
    Posts
    298
    Plugin Contributions
    0

    Default Re: Products Below Categories [Support Thread]

    Once again....Perfect!

    That code change worked....and yes, there are products in subcategories that show in multiple subcategories.

    Once again, I really appreciate you making this plugin and for your help today!

 

 

Similar Threads

  1. v151 Password Protect Categories by Ausgirl [Support Thread]
    By Ausgirl in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 20 Feb 2016, 06:33 PM
  2. Password Protected Categories (PPC) - Support Thread
    By stevish in forum All Other Contributions/Addons
    Replies: 31
    Last Post: 29 Sep 2012, 09:23 PM
  3. Products/Categories URLs Exporter Support Thread
    By joshuayang in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 28 Mar 2010, 05:33 PM
  4. Add descriptions to all your sub categories Support Thread
    By mani in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 18 Dec 2008, 09:31 PM
  5. Admin Users - Restrict Product Categories Support Thread
    By anafor in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 13 Aug 2008, 09:30 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