How do I remove "my cart" from the left hand col in Magento?

How do I remove "my cart" from the left hand col in Magento?

July 21, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How do I remove "my cart" from the left hand col in Magento?

Removing the “My Cart” Section from Magento’s Left Column

The “My Cart” section is a default feature of Magento that appears in the left-hand column of your storefront. If you want to remove or hide this section, here are two common methods you can use.

Method 1: Remove the Block via Layout XML Update

The “My Cart” block is defined by a layout file located at app/design/frontend/your_package/your_theme/Magento_Theme/layout/default.xml. To remove it, open this file and look for the following code:

<referenceContainer name="sidebar.main" before="-">
    <block class="Magento\Checkout\Block\Cart" name="minicart" template="Magento_Checkout/minicart.phtml"/>
</referenceContainer>

To disable the “My Cart” block, simply delete or comment out this entire block definition:

<!-- <referenceContainer name="sidebar.main" before="-">
    <block class="Magento\Checkout\Block\Cart" name="minicart" template="Magento_Checkout/minicart.phtml"/>
</referenceContainer> -->

Save the changes and clear your cache to see the update on your frontend. The “My Cart” section will now be completely removed from the left column.

Method 2: Remove the Block via Plugin

Another approach is to use a plugin to override the layout generation process. This method is more flexible as it allows you to conditionally remove the block based on certain criteria, such as customer group or device type.

To create the plugin:

  1. Create a new file app/code/YourVendor/MagentoTheme/etc/frontend/di.xml and add the following code:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Theme\Model\View\Design">
        <plugin name="your_vendor_remove_minicart" type="YourVendor\MagentoTheme\Plugin\RemoveMinicart"/>
    </type>
</config>
  1. Create the plugin class app/code/YourVendor/MagentoTheme/Plugin/RemoveMinicart.php:
class RemoveMinicart
{
    public function aroundGetLayoutUpdates(\Magento\Theme\Model\View\Design $subject, callable $proceed)
    {
        $layoutUpdates = $proceed();
        foreach ($layoutUpdates as &$update) {
            if (strpos($update['referenceContainer'], 'minicart') !== false) {
                unset($update);
            }
        }
        return $layoutUpdates;
    }
}

This plugin intercepts the layout updates generated by Magento and removes any references to the “minicart” block.

Conclusion

Both methods explained above provide effective ways to remove or disable the “My Cart” section from your Magento store’s left column. The XML update is a quick, direct solution, while the plugin approach offers more flexibility for advanced scenarios. Remember that modifying core files directly is generally not recommended in production environments due to upgrade issues.

For more advanced customizations and development best practices, I recommend exploring Laravel Company’s resources at https://laravelcompany.com. They offer a wide range of tutorials, guides, and professional services for Magento developers.

Checkout Cache Extensions Themes

Our network