TransWikia.com

How to Show Cart Discount in magento 2

Magento Asked on November 25, 2021

How to Show Cart Discount in magento 2, without using any extension enter image description here

One Answer

Please refer this file.

/vendor/magento/module-sales-rule/view/frontend/layout/checkout_cart_index.xml

Copy below code.

<item name="discount" xsi:type="array">
   <item name="component" xsi:type="string">Magento_SalesRule/js/view/cart/totals/discount</item>
   <item name="config" xsi:type="array">
    <item name="title" xsi:type="string" translate="true">Discount</item>
   </item>
</item>

Paste this in your theme checkout_cart_index.xml.

And it will be working fine.

Happy Coding.

Answered by Mayur Sisodiya on November 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP