I want to remove all associated product from configurable product .

How can i do this

I m trying to do like this

$product = Mage::getModel('catalog/product')->load(11);

but its not working

2 Answers 2


use the below code:

    ->saveProducts($product, array());

Send saveProducts() second params as empty arrya

Your code like this:

$product = Mage::getModel('catalog/product')->load(11);
    ->saveProducts($product, array());
  • How can this be achieved in Magento 2?
    – Nausif
    Aug 1, 2017 at 10:01
  • @Nausif did you find this solution in Magento 2? If yes, can you guide... Jul 8, 2020 at 10:00

For those (like myself) who are here for a Magento2 answer:

If we're doing it programmatically using objectManager (I know, I know)

//Set up connection to Magento instance
use Magento\Framework\App\Bootstrap;
require '../app/bootstrap.php'; //My file is in the pub dir
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('Magento\Framework\App\State');

//Load the product
$productId = '12345';
$product = $objectManager->create('Magento\Catalog\Model\Product')->load($productId); 

//Here's the clear bit (be careful with this)

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.