4

I've scoured the interwebs and have found some information on how to do this but it looks like files and method to accomplish this have changed from 2.0->2.02.

I'm using the standard Luma theme.

all/any help appreciated.

1

2 Answers 2

3

For this requirement,you need to go checkout_cart_index.xml file and remove this code:

...

<block class="Magento\Checkout\Block\Cart\Shipping" name="checkout.cart.shipping" as="shipping" template="cart/shipping.phtml">
....
  </argument>
                        </arguments>
                    </block>

Or use :

You can use this section using tag.

<referenceBlock name="checkout.cart.shipping" remove="true" /> <!-- use this code --> 

for remove this section .

See how to use http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-instructions.html#fedg_layout_xml-instruc_ex_rmv

Update answer at

https://magento.stackexchange.com/a/283648/4564

5
  • Great I'll give this a go and report back...is this in the xml file in ./vendor/magento/module-checkout/? or another directory. I have about 15 files named this Commented Mar 21, 2016 at 8:20
  • 2
    Be careful, as this approach will likely cause JavaScript errors. Better to do this: magento.stackexchange.com/a/113151/567 Commented Apr 7, 2017 at 14:30
  • Create virtual/digital products. :) Commented Jun 28, 2017 at 4:16
  • After using this getting js error. The better solution is here magento.stackexchange.com/a/191712/31729
    – Manish
    Commented Jun 15, 2018 at 10:40
  • I got js error as well... thanks @Manish for the info Commented May 28, 2019 at 3:57
0

Create Your theme

add below file checkout_cart_index.xml at /app/design/frontend/[VendorName]/[ThemeName]/Magento_Checkout/layout/checkout_cart_index.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="checkout_cart_item_renderers"/>
    <body>
        <referenceBlock name="checkout.cart.shipping">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="block-summary" xsi:type="array">
                            <item name="config" xsi:type="array">
                                <item name="componentDisabled" xsi:type="boolean">true</item>
                            </item>

                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.