0

Please Check Attached screenshot:enter image description here

On Checkout Page under Shipping Step i want to display Shopping Cart page applied discount Coupon Code and Amount.

Please check below code:

app\code\Vendor\Module\view\frontend\layout\checkout_index_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.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="sidebar" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="summary" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="cart_items" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <item name="details" xsi:type="array">
                                                            <item name="component"
                                                                  xsi:type="string">Vendor_Module/js/view/summary/item/details</item>
                                                        </item>

                                                </item>

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

If Anyone having any idea please suggest, Thanks in Advance!!.

1 Answer 1

0

Please check below code worked for me.

app\code\Vendor\Module\view\frontend\layout\checkout_index_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.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="sidebar" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="summary" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="cart_items" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <item name="details" xsi:type="array">
                                                            <item name="component"
                                                                  xsi:type="string">Vendor_Module/js/view/summary/item/details</item>
                                                        </item>

                                                </item>

                                            </item>

                                            <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>

                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                   </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>
1
  • 1
    here i got perfect solutions on it rakeshjesadiya.com/… it will display all data as like: totals, shipping amount, discount, tax and etc. Commented Dec 23, 2019 at 11:36

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.