{"id":701,"date":"2019-12-09T04:57:41","date_gmt":"2019-12-09T04:57:41","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2019\/12\/09\/undefined-method-in-getconfigurableattributecollection-in-magento-2-3-3\/"},"modified":"2025-05-22T15:15:45","modified_gmt":"2025-05-22T09:45:45","slug":"undefined-method-in-getconfigurableattributecollection-in-magento-2-3-3","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/undefined-method-in-getconfigurableattributecollection-in-magento-2-3-3\/","title":{"rendered":"Solved &#8211; Undefined Method in getConfigurableAttributeCollection in Magento 2.3.3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Losing a conversation at checkout is painful, owing to all the efforts you put in shaping the customer journey and reach till checkout.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Checkout page optimization can save you the bucks that you lose due to cart abandonment. Any errors on the checkout step can be fatal and one such checkout issue due to <strong>undefined method in getConfigurableAttributeCollection in Magento 2.3.3<\/strong>&nbsp; is identified.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The customers won\u2019t be able to redirect on the payment gateway in some cases due to the below error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Uncaught exception \u2018Error\u2019 with message \u2018Call to undefined method MagentoCatalogModelProductTypeSimple::getConfigurableAttributeCollection()\u2019 in \/home\/ortlieb\/public_html\/vendor\/magento\/module-configurable-product\/Helper\/Product\/Options\/Loader.php:52<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Uncaught exception \u2018Error\u2019 with message \u2018Call to undefined method MagentoCatalogModelProductTypeSimple::getConfigurableAttributeCollection()\u2019 in \/home\/ortlieb\/public_html\/vendor\/magento\/module-configurable-product\/Helper\/Product\/Options\/Loader.php:52 in MagentoConfigurableProductHelperProductOptionsLoader::load called at \/home\/ortlieb\/public_html\/vendor\/magento\/module-configurable-product\/Model\/Product\/ReadHandler.php (48) in MagentoConfigurableProductModelProductReadHandler::execute called at \/home\/ortlieb\/public_html\/vendor\/magento\/framework\/EntityManager\/Operation\/Read\/ReadExtensions.php (48) in MagentoFrameworkEntityManagerOperationReadReadExtensions::execute called at \/home\/ortlieb\/public_html\/vendor\/magento\/framework\/EntityManager\/Operation\/Read.php (112) in MagentoFrameworkEntityManagerOperationRead::execute called at \/home\/ortlieb\/public_html\/vendor\/magento\/framework\/EntityManager\/EntityManager.php (70) in MagentoFrameworkEntityManagerEntityManager::load called at \/home\/ortlieb\/public_html\/vendor\/magento\/module-catalog\/Model\/ResourceModel\/Product.php (648) in MagentoCatalogModelResourceModelProduct::load called at \/home\/ortlieb\/public_html\/generated\/code\/Magento\/Catalog\/Model\/ResourceModel\/Product\/Interceptor.php (258) in MagentoCatalogModelResourceModelProductInterceptor::load called at \/home\/ortlieb\/public_html\/vendor\/magento\/framework\/Model\/AbstractModel.php (540) in MagentoFrameworkModelAbstractModel::load called at \/home\/ortlieb\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php (58) in MagentoCatalogModelProductInterceptor::___callParent called at \/home\/ortlieb\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php (138) in MagentoCatalogModelProductInterceptor::MagentoFrameworkInterception{closure} called at \/home\/ortlieb\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php (153) in MagentoCatalogModelProductInterceptor::___callPlugins called at<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you face the same error, implement the below solution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution to Undefined Method In getConfigurableAttributeCollection in Magento 2.3.3:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add simple condition in <em><strong><em><strong>Magento\\ConfigurableProduct\\Helper\\Product\\Options\\Loader::load(ProductInterface $product)<\/strong><\/em><\/strong><\/em> after line no : 51<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">if (get_class($typeInstance) == 'Magento\\Catalog\\Model\\Product\\Type\\Simple' || get_class($typeInstance) == 'Magento\\Bundle\\Model\\Product\\Type')\n{\n            return null;\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do share the solution with fellow developers via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Losing a conversation at checkout is painful, owing to all the efforts you put in shaping the customer journey and reach till checkout. Checkout page&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-701","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=701"}],"version-history":[{"count":4,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/701\/revisions"}],"predecessor-version":[{"id":15155,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/701\/revisions\/15155"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}