Post by sn_oc » Fri Aug 03, 2012 4:34 pm

Hi,

My understanding of default categories implementation in OpenCart is as follows:
1. If I click on a category, it shows links for sub-categories and shows products linked to the clicked category. Now when I click on sub-category, it shows me the products for the sub-category.

How is it possible to show up the products at sub-category level ALSO at the category level since the products in sub-category are also part of category in a way.

Left to myself, as an end-user, I would want:
1. when I click on a category, I can see all the 'unique products' under that category tree (which includes products from sub-categories also under that category)
2. In addition, user has the option to refine the list by clicking on a particular sub-category, which is possible today also.
3. The step 1 will improve user experience tremendously in my opinion.

Just to summarize, current default implementation is :
- When I click on a category, I don't see all the products in that category tree (including sub-categories). I only see the products linked to the clicked category and a list of sub-categories. I want the products of sub-categories also to be shown here at the parent level.

Looking forward to some standard extensions to solve this problem.

Regards

Newbie

Posts

Joined
Fri Aug 03, 2012 4:15 pm

Post by avvishnu » Wed Oct 03, 2012 5:03 pm

Please go to /catalog/controller/product folder and open category.php and find this code (Near Line no : 145)
" 'filter_category_id' => $category_id, " add this code " 'filter_sub_category' => true, " after that.
Then you can go to home page and click on the category it will show all the products under subcategories also.

Newbie

Posts

Joined
Tue Dec 27, 2011 1:51 pm

Post by Johnathan » Wed Oct 03, 2012 9:31 pm

An easier way: since products can be in multiple categories, when you're adding products to categories, just add them to the category and its sub-categories as well.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by avvishnu » Thu Oct 04, 2012 1:46 am

if there is an 100 subcategories u need to add all those products under 100 categories to the main category its not easy way. Better do add the code in the previous message.

Newbie

Posts

Joined
Tue Dec 27, 2011 1:51 pm
Who is online

Users browsing this forum: No registered users and 37 guests