Magento Forum

Not all Products are shown in parent categories on website after import via PHP-Script
 
Aikanet
Member
 
Avatar
Total Posts:  40
Joined:  2009-03-16
Düsseldorf, Germany
 

Hi there!
Actually i’m importing products via PHP-Script (useing Magento-Methods) to import products. The producs are also assigned to categories.
Now i have the problem, that not all products are shown on the parent categories.

Example:

Categories:
- Shoes
- Shoes > Sneakers

Product A is assigned to category “Sneakers” -> The product is not shown in category “Shoes” until i save the product manually in Amin-Panel.

...
$data['category_ids'"3,4,5"// assigned categories
$product->setData($data);
$product->save();
...

Is there a solution out there to get the producty visible on all parent categories via PHP-Script?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Aikanet
Member
 
Avatar
Total Posts:  40
Joined:  2009-03-16
Düsseldorf, Germany
 

SOLVED: The affected categories had to be set as

Is Anchor = yes

. After rebuilding the index all products are also shown in the parent categories.
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top