I have configurable products that have simple products and they are configurable by two attributes - posters with size and frame. I am adding new products that represent new frames and sizes which are created ok, but I want them to attach to a certain configurable product.

I have a configurable product - poster with this simple products

Wood frame - 30x30cm
Aluminum frame - 50x50cm
Aluminum frame - 70x50cm

I generate

Wood 50 x 50cm
Aluminum 100x100cm

How can I do that?

1 Answer 1


Thanks to @marius. I got a answer from this link.

You can assign simple product to configurable by following code

Mage::getResourceSingleton('catalog/product_type_configurable') ->saveProducts($mainConfigrableProduct, $simpleProductIds);

Here $mainConfigrableProduct is configurable product object and $simpleProductIds is array of simple product id

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.