Magento 2.3.1 multistore.
After checkout 'place order' site goes loading. Then throws error:
Fatal error: Uncaught Error: Call to undefined method Magento\Catalog\Model\Product\Type\Simple::getConfigurableAttributeCollection() in /home/ortlieb/public_html/vendor/magento/module-configurable-product/Helper/Product/Options/Loader.php:52 Stack trace: #0 /home/ortlieb/public_html/vendor/magento/module-configurable-product/Model/Product/ReadHandler.php(48): Magento\ConfigurableProduct\Helper\Product\Options\Loader->load(Object(Magento\Catalog\Model\Product\Interceptor)) #1 /home/ortlieb/public_html/vendor/magento/framework/EntityManager/Operation/Read/ReadExtensions.php(48): Magento\ConfigurableProduct\Model\Product\ReadHandler->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array) #2 /home/ortlieb/public_html/vendor/magento/framework/EntityManager/Operation/Read.php(112): Magento\Framework\EntityManager\Operation\Read\ReadExtensions->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array) #3 /home/ortlieb/public_html/vendor/magento/framework/EntityManager/EntityManager.php(70): Magento\Framework\ in /home/ortlieb/public_html/vendor/magento/module-configurable-product/Helper/Product/Options/Loader.php on line 52
All help appreciated
Solved! Go to Solution.
Nope, Ultimo theme. Nothing special. Made a change here vendor/magento/module-configurable-product/Helper/Product/Options
In 'loader.php' did this:
starting at line 47 made this mod.
public function load(ProductInterface $product)
{
$options = [];
/** @var Configurable $typeInstance */
$typeInstance = $product->getTypeInstance();
if (get_class($typeInstance) == 'Magento\Catalog\Model\Product\Type\Simple' || get_class($typeInstance) == 'Magento\Bundle\Model\Product\Type')
{
return null;
}
So far so good. Not sure if real solution yet but did not yet see error again.
Hello @emile_rdam
Do you use any custom code to load product ?
If yes, then can u pls share the code here so we can debug easily.
If Found my answer useful Please give Kudos and Accept it as Solution.
Nope, Ultimo theme. Nothing special. Made a change here vendor/magento/module-configurable-product/Helper/Product/Options
In 'loader.php' did this:
starting at line 47 made this mod.
public function load(ProductInterface $product)
{
$options = [];
/** @var Configurable $typeInstance */
$typeInstance = $product->getTypeInstance();
if (get_class($typeInstance) == 'Magento\Catalog\Model\Product\Type\Simple' || get_class($typeInstance) == 'Magento\Bundle\Model\Product\Type')
{
return null;
}
So far so good. Not sure if real solution yet but did not yet see error again.