gl636474 / NaturesCupboard2

0 stars 0 forks source link

Some imported products not in "All Products" #22

Closed gl636474 closed 4 years ago

gl636474 commented 4 years ago

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.

gl636474 commented 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:

gl636474 commented 4 years ago

Or maybe add a new addToRootCategory() method so as not to make setProductCategories() more complicated!

gl636474 commented 4 years ago

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.