0

I am having an issue here. After applying discount, the amount is not showing in Summary on Checkout .

enter image description here

1 Answer 1

0

You can try with this code it's work for me. or you can explain your code in detail so we can understand. Thanks

app/design/frontend/theme_package/theme_name/Magento_Checkout/layout/checkout_cart_index.xml file

<container name="checkout.cart.totals.container" as="totals" label="Shopping Cart Totals">
                    <block class="Magento\Checkout\Block\Cart\Totals" name="checkout.cart.totals" template="Magento_Checkout::cart/totals.phtml">
                        <arguments>
                            <argument name="jsLayout" xsi:type="array">
                                <item name="components" xsi:type="array">
                                    <item name="block-totals" xsi:type="array">
                                        <item name="component" xsi:type="string">Magento_Checkout/js/view/cart/totals</item>
                                        <item name="displayArea" xsi:type="string">totals</item>
                                        <item name="config" xsi:type="array">
                                            <item name="template" xsi:type="string">Magento_Checkout/cart/totals</item>
                                        </item>
                                        <item name="children" xsi:type="array">
                                            <item name="subtotal" xsi:type="array">
                                                <item name="component"  xsi:type="string">Magento_Checkout/js/view/summary/subtotal</item>
                                                <item name="config" xsi:type="array">
                                                    <item name="title" xsi:type="string" translate="true">Subtotal</item>
                                                    <item name="template" xsi:type="string">Magento_Checkout/cart/totals/subtotal</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 name="shipping" xsi:type="array">
                                                <item name="component"  xsi:type="string">Magento_Checkout/js/view/cart/totals/shipping</item>
                                                <item name="config" xsi:type="array">
                                                    <item name="title" xsi:type="string" translate="true">Shipping</item>
                                                    <item name="template" xsi:type="string">Magento_Checkout/cart/totals/shipping</item>
                                                </item>
                                            </item>
                                            <item name="grand-total" xsi:type="array">
                                                <item name="component"  xsi:type="string">Magento_Checkout/js/view/summary/grand-total</item>
                                                <item name="config" xsi:type="array">
                                                    <item name="title" xsi:type="string" translate="true">Estimated Total</item>
                                                    <item name="template" xsi:type="string">Magento_Checkout/cart/totals/grand-total</item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </argument>
                        </arguments>
                    </block>
                </container>

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.