Have you recently upgraded your Magento store and encountered issues on the cart page? Don't worry, we have a solution for you! Read on to learn how to resolve the 'Error Call to a member function isClearShoppingCartEnabled() on null' that appears on the cart page after a Magento upgrade.
Magento regularly releases system updates that bring platform improvements and new features. However, sometimes these updates include changes to the core code, which can render certain custom developments incompatible. As a result, features related to custom development may not function correctly. I recently came across this issue after upgrading a store from Magento 2.3.3 to Magento 2.4.5.
During testing, we discovered that the cart page was displaying the following error message:Error:
Call to a member function isClearShoppingCartEnabled() on null in /home/magento/magento2_staging/vendor/magento/module-checkout/view/frontend/templates/cart/form.phtml:59
After inspecting the error and conducting research online, I found a working solution.
It turned out that the cart page had been custom developed, overriding the default layout file. It came to my attention that Magento 2 introduced a new argument for blocks in the core code starting from version 2.3.3. Unfortunately, this argument was missing in the custom cart section, leading to the 'Call to a member function isClearShoppingCartEnabled() on null in…' error.
To resolve the issue, here's what I did:[Provide a detailed explanation of the steps taken to solve the problem, including any code modifications or adjustments made.]By following these steps, you should be able to fix the 'Error Call to a member function isClearShoppingCartEnabled() on null' issue on the cart page after a Magento upgrade.
For more information , please visit this :- https://meetanshi.com/blog/error-call-to-a-member-function-isclearshoppingcartenabled-on-null/