As the title says, how can I remove the summary to the right of the shopping cart in Magento 2?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
To make your change without editing Magento's core files you will need to extend the blank theme. To do this create the following file:
In here add the following code to remove the block:
<?xml version="1.0" ?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="cart.summary" remove="true" /> </body> </page>
The original code responsible for rendering this block can be found in
I wouldn't advise removing the summary unless you're going to add some of the functionality back, it would make for a bad user experience especially as it removes the checkout button and extra pricing info.
To remove it from the sidebar, you can do it in the html file.
<!-- ko foreach: getRegion('summary') --> <!-- ko template: getTemplate() --><!-- /ko -->
from the file
Note: Donot work on the core file. Copy the file to your theme and work on that.
layout/default.xml from checkout module and paste this to
your_theme foldr/Magento_Checkout/layout folder then comment
<arguments></arguments> located just behind of
<block class="Magento\Checkout\Block\Cart\Sidebar" name="minicart" as="minicart" after="custom_header" template="cart/minicart.phtml">.
Then clear cache,
delete pub/static/frontend folder and
var/view_preprocessed` folder and run `php bin/magento setup:static-content:deploy.
Hope this will work for you also as the way it work for me.