can we change Tax text to other text like "US 6% Sales Tax", in the checkout,
2 Answers
It is easy way to follow step and change your text :-
First this file override your theme checkout_cart_index.xml
and change your text
/app/design/frontend/Vendor_Name/Theme_Name/Magento_Tax/layout/checkout_cart_index.xml
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<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="component" xsi:type="string">Magento_Tax/js/view/checkout/cart/totals/tax</item>
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">Magento_Tax/checkout/cart/totals/tax</item>
<item name="title" xsi:type="string" translate="true">US 6% Sales Tax</item>
</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
</body>
</page>
After you change run below command :-
php bin/magento s:up
php bin/magento s:s:d -f
php bin/magento c:c
php bin/magento c:f
And Check Output :-
THANKS.
Find file
app\design\frontend\base\default\template\tax\checkout\tax.phtml
And find this code
<?php else: ?>
<?php echo $this->getTotal()->getTitle() ?>
<?php endif;?>
I just commented out the echo part.... and replaced with "Your word".
I know this is not correct way but your work will be done.
Thanks.