0

enter image description here

I tried:

In vendor folder

 <item name="grand-total" xsi:type="array">
      <item name="component"  xsi:type="string">Magento_Tax/js/view/checkout/cart/totals/grand-total</item>
           <item name="config" xsi:type="array">
            <item name="template" xsi:type="string">Magento_Tax/checkout/cart/totals/grand-total</item>
                 <item name="exclTaxLabel" xsi:type="string" translate="true">Order Total Excl. Tax</item>
                 <item name="inclTaxLabel" xsi:type="string" translate="true">Order Total Incl. Tax</item>
            <item name="title" xsi:type="string" translate="true">Order Total </item>
      </item>
     </item>

In my module Test\MyAccount\view\frontend\layout\checkout_cart_index.xml

  <?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="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="grand-total" xsi:type="array">
                                <item name="config" xsi:type="array">                                       
                                    <item name="title" xsi:type="string" translate="true">You Pay</item>
                                </item>
                            </item>
                        </item>
                    </item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
</body>
</page>
  • What is the title which you want to rename? – Khoa TruongDinh Oct 28 '17 at 1:42
  • I want to rename Order Title to You Pay – jassi Oct 28 '17 at 3:08
1

The cart summary used js layout.

In our custom layout,

app/code/Vendor/Checkout/view/frontend/layout/checkout_cart_index.xml

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" 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="grand-total" xsi:type="array">
                                    <item name="config" xsi:type="array">
                                        <item name="title" xsi:type="string" translate="true">Order Total Custom</item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Tested on Magento 2.2.0 version.

  • I tried but file is not getting called from custom layout file. – jassi Oct 28 '17 at 4:13
  • Did you create a new module? – Khoa TruongDinh Oct 28 '17 at 4:14
  • yes, I have created new module – jassi Oct 28 '17 at 4:15
  • I'm pretty sure it will work. Try to clear Magento Cache and Browser Cache. – Khoa TruongDinh Oct 28 '17 at 4:17
  • Also, make sure your custom module works or not. – Khoa TruongDinh Oct 28 '17 at 4:25
0

You can change Title 'Order Total' to 'You Pay' using language translation CSV. Create language csv file as per your locale in app/design/frontend/your_vendor_name/your_theme_name/i18n/en_US.csv. Add "Order Total","You Pay" string in this file.

0

In the below file you can change the total tile to your custom title vendor\magento\module-tax\view\frontend\layout\checkout_cart_index.xml

0

You can change Order Total to You Pay using language translate: Install language pack. /app/i18n/vendor_name/languagepack/en_us.csv(other language if used)

add string into this file:

"Order Total","You Pay"

then apply command:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy en_US <other_language>

You may require to run this after setup:upgrade command:

rm -rf pub/static/frontend/*

Contact me if not working!

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.