Magento hide categories if no products for current store

I have a Magento multi-site implemented using Magento 1.7CE. I have [url removed, login to view] where the Magento installation exists and [url removed, login to view] with only a few key files. The sites share one product catalogue, but some products are not sold on the other. The products are properly set up in the backend with the relevant websites set at the product level. The issue I have is that the category tree (navigation) appears the same on both sites even though they may be empty. What I want is for categories to appear or NOT appear based on the count of products in each category that belong to each site. Also, this logic should be recursive; if there is no product in parent but there is in child, the parent and child should appear. I have followed a tutorial at [url removed, login to view] and implemented, but it doesn't work because it does a product count for the entire category, NOT the number of products that belong to current site in that category. Thus, even if there are no product assigned to the current store, the category still appears, even though it has no products.

So, I need someone to modify the way this module works as follows:

- Alter the [url removed, login to view] to find the current store and count the number of products assigned to each category that belong to current store.

- Where the count is zero, remove the category from the collection.

- Where a child exists that has a product count > 0, include the parent and child in the collection. There is some code given in the comments under the article (URL above) to do this.

Kemahiran: Magento, MySQL, PHP

Lihat lagi: magento hide category product, hide category products magento, magento hide empty categories, magento hide empty category, magento hide empty categories navigation, what is recursive, tutorial tree, tutorial find, tree tutorial, to-do categories, number tutorial, Magento Multi Store, magento module, hide, tree category php, magento site url, count recursive, magento parent product, magento observer, logic tree

Tentang Majikan:
( 4 ulasan ) Elwood, Australia

ID Projek: #4314468

Dianugerahkan kepada:


Hello Please read more than private message thank you

$200 USD dalam 5 hari
(38 Ulasan)

2 pekerja bebas membida secara purata $138 untuk pekerjaan ini


I'm currently working at Magento Silver Partner and I also knew what need to be done on this project. It would be great if I could help you handle this issue.

$100 USD dalam sehari
(2 Ulasan)

Hello, Happy to jump in and help!

$175 USD dalam 7 hari
(0 Ulasan)