Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save maximspokoiny/2ef748f743f8e51618fa463eb23d8de4 to your computer and use it in GitHub Desktop.
Save maximspokoiny/2ef748f743f8e51618fa463eb23d8de4 to your computer and use it in GitHub Desktop.
magento update configurable product error
$product->getTypeInstance()->setUsedProductAttributeIds(array(92)); //attribute ID of attribute 'color' in my store
$configurableAttributesData = $product->getTypeInstance()->getConfigurableAttributesAsArray();
$product->setCanSaveConfigurableAttributes(true);
$configurableProductsData = array(//... ); //there data with new id's
$product->setConfigurableProductsData($configurableProductsData);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment