0

I have a grouped product and am looking to remove all associated products from it programmatically. I tried using a similar method as one would use for a configurable product found here:

How to remove associated products from configurable product?

But there is no comparable saveProducts() method for grouped products because there is no resource 'catalog/product_type_grouped'. I've tried to follow the saveAction method used in Adminhtml/controllers/catalog/product/ProductController, but haven't found the piece of code that saves the associated products selected in the admin form.

Could anyone point me in the right direction?

0

Figured it out. This is a variation of some code in the _initProductSave() method of the same controller:

$groupedProduct->setGroupedLinkData(array());
$groupedProduct->save();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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