0

I have tried to place an order with simple and configurable product but after placing in success page i am getting below error.

Fatal error: Uncaught Error: Call to undefined method Magento\Catalog\Model\Product\Type\Simple::getConfigurableAttributeCollection() in /var/www/html/m2/vendor/magento/module-configurable-product/Helper/Product/Options/Loader.php:52 Stack trace: #0 /var/www/html/m2/vendor/magento/module-configurable-product/Model/Product/ReadHandler.php(48): Magento\ConfigurableProduct\Helper\Product\Options\Loader->load(Object(Magento\Catalog\Model\Product\Interceptor)) #1 /var/www/html/m2/vendor/magento/framework/EntityManager/Operation/Read/ReadExtensions.php(48): Magento\ConfigurableProduct\Model\Product\ReadHandler->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array) #2 /var/www/html/m2/vendor/magento/framework/EntityManager/Operation/Read.php(117): Magento\Framework\EntityManager\Operation\Read\ReadExtensions->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array) #3 /var/www/html/m2/vendor/magento/framework/EntityManager/EntityManager.php(61): Magento\Frame in /var/www/html/m2/vendor/magento/module-configurable-product/Helper/Product/Options/Loader.php on line 52

Please help me to fix this

0

There's a simple product that is handled like a configurable product.

This leads to the error that getConfigurableAttributeCollection() is called on a simple product, which does not have that method of course.

I assume that you imported products or created some of them programmatically? You could check your database if all products that should have configurable attributes actually have "type_id=configurable" in the catalog_product_entity table.

If this does not work, please add some more data to your question: does it always occur with the same product, how was this product created, how does it look in the database?

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.