Closed gl636474 closed 4 years ago
Need to update Gareth_NaturesCupboard2_Model_Observer_Categories::setProductCategories()
to add in the root category.
Add helper method to Gareth_NaturesCupboard2_Helper_Lookup
to return the root category. Will have to use:
Gareth_NaturesCupboard2_Helper_Constants::Gareth_NaturesCupboard2_Helper_Constants()
Gareth_NaturesCupboard2_Helper_Lookup::getStore()
Or maybe add a new addToRootCategory()
method so as not to make setProductCategories()
more complicated!
There is also a second reason why products do not appear in the front end: imported products must also be added to the Natures Cupboard website as well. This is probably best done in a separate observer.
In order for products to appear in the "All Products" category, they must be in the root category. When importing new products via the bulk spreadsheet, if no category-attributes (e.g. "is_food") are true then the product is not added to any categories.
The Category Observer must always add products to the root category, even if none of the category attributes have true set.