my problem is, that my imported products don’t appear in search-results and the common solutions, like rebuilding index didn’t help. Now I discovered, this is connected to the fact, they are not in the root-category of the shop. When I add them, they appear.
Then I checked what happens, when I add a product “manually” in the admin. It’s not listed in the root-category, but still can be found via search. I looked into the database and compared it with the other products. There seem to be two tables, containing product-category-mappings:
The manually added product doesn’t appear in the first one, but in the second one it’s mapped to the shop-root. The record contains these values:
category_id: 2 product_id: 2333 position: 0 is_parent: 0 store_id: 1 visibility: 4
When I add a record in this style for a script-imported product, I get the same result: it becomes available to the search, but on the products category-page in the admin, it\’s not assigned to the shop-root.
I see two options right now:
a) manipulating the db-table â dirty solution, don’t like it
b) “Regularly” adding all products to the shop-root via import-script â I’m not sure, if this has unplesant consequences, cause I’m still a beginner with magento, but it seems to be ok.
Is there a better one I’m missing?
BTW: All my products are in sub-categories of the shop-root, but that’s not enough - apparently.
I guess either the search has a bug, or the Mage_Catalog_Model_Product->save() function is missing to set this mapping. Am I right?
Thanks for any hints in advance,