tags:

views:

105

answers:

1

I have a script that is creating a lot of configurable products and their associated simple products.

Everything goes ok and when inspecting the products in the admin section, everything is linked up and looks great.

The problem is that the products are not visible until I manually go to the admin section and save the configurable product - without changing any options - and then each simple product that is associated with it. After each simple product is saved, its option becomes available on the from end for the configurable product.

Does anyone have any ideas on this?

+1  A: 

Solved this by going through the saveAction in the ProductController.

I wasnt setting the websiteIds correctly so the new products were never getting added to the site correctly.

Magento uses this method to get the currect website:

->setWebsiteIds(array(Mage::app()->getStore(true)->getWebsite()->getId()))

Drew