Fatal error: Call to undefined method getUsedProducts() in magento
When i use SCP module, i got the following error message,
Fatal error: Call to undefined method OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Product_Type_Simple::getUsedProducts() in
Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php on line 160.
After a long time back i got some solution, in a below code we are passing two parameter
Mage::getResourceModel(‘catalog/product_type_configurable’)
->saveProducts($confProdInstance, $productIds);
1. $confProdInstance is the configurable product instance
2. $productIds is the array containing all the simple products’s id to associate to the configurable one.
Here we need to pass configurable product id instead of configurable product instance.
Mage::getResourceModel(‘catalog/product_type_configurable’)
->saveProducts($confProdInstance->getId(), $productIds);
Note: I hope this solution will helpful for some of the scenario.But not all the scenario’s.
where did you add this code?
Hi Shansy,
Find this below code and replace configurable parameter as like below
$confProdInstance->getId()
Ref: https://jutesenthil.wordpress.com/2014/09/08/fatal-error-call-to-undefined-method-getusedproducts-in-magento/#comment-566
”
Mage::getResourceModel(‘catalog/product_type_configurable’)
->saveProducts($confProdInstance, $productIds);
1. $confProdInstance is the configurable product instance
2. $productIds is the array containing all the simple products’s id to associate to the configurable one.
Here we need to pass configurable product id instead of configurable product object.
Mage::getResourceModel(‘catalog/product_type_configurable’)
->saveProducts($confProdInstance->getId(), $productIds); “
Hi jutesenthil
This variable doesn’t exist in the module $confProdInstance->getId(), can you tell on which function you have dound it and what is the path to the file ?