Magento 2 Checkout Summary Section Sort Order.

We will add sort order to summary section. we will move item section before totals with use of totals on checkout page.

First of all we will need to override layout file in our theme as i am giving you example.

checkout_index_index.xml we will override in our theme.

As a second step we need to add layout rearrangement as we given below.

<page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="checkout.root">
                <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="totals" xsi:type="array">
                                                    <item name="sortOrder" xsi:type="string">99</item>
                                                <item name="cart_items" xsi:type="array">
                                                    <item name="sortOrder" xsi:type="string">0</item>

Clear cache and deploy static content deploy and refresh the page.

Thats it...!!! Have a noce day...!!!

Experienced Magento Certified Developer with a demonstrated history of working in the information technology and services industry. Skilled in SQL, PHP, XAMPP, jQuery, and Microsoft Office. Strong engineering professional with a Master of Computer Applications


Post a Comment

Popular Posts

Have You Any Questins Let Us Know.

Contact Us
Ahmedabad India