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.