1

i have a problem! Necessity to delete label and value tax in to cart and checkout. I not found the .phtml file to remove this.

enter image description here

1
  • Had you a try with my suggested answer ? – Suresh Chikani Nov 19 '16 at 19:08
3

You can remove tax from cart page, check below file

vendor\magento\module-tax\view\frontend\web\template\checkout\cart\totals\tax.html

<tr class="totals-tax">
        <th data-bind="text: title" class="mark" colspan="1" scope="row"></th>
        <td data-bind="attr: {'data-th': title}" class="amount">
            <span class="price" data-bind="text: getValue()"></span>
        </td>
    </tr>

This code used for display tax in cart page, you can remove or comment out.

Note : exmaple file path is core path, you have to extend file in your theme.

Delete pub/static/*

Run command : php bin/magento setup:static-content:deploy

Delete your browser cache.

Now you can see your changes.

2
  • you should copy the file to your theme directory and then comment the code. – Kumar A. Nov 18 '16 at 10:12
  • I have already added Note in my answer. – Suresh Chikani Nov 18 '16 at 10:21
0

Disabling and removing checkout totals items are documented here: http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_customize.html

1.To Disable the tax row go to your theme > Magento_Tax/layout/checkout_index_index.xml and checkout_cart_index.xml then add the lines:

<referenceBlock name="checkout.cart.totals">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="block-totals" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="tax" xsi:type="array">
                                    <item name="config" xsi:type="array">
                                        <item name="componentDisabled" xsi:type="boolean">true</item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
 </referenceBlock>

Disabling an item using this way only hides it from view but still loaded in the query. If you want to completely remove it from page load then follow the documentation stated in the above link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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