Evrig

Hey there! Ever wondered how to tweak your checkout summary when you pick a shipping method in Magento 2? Well, I’ve got an easy fix just for you!

Understanding the significance of a checkout summary is key during the buying journey. Shoppers want a clear picture of their order and the total amount to be paid. For Magento 2 store owners employing the two-step checkout, this process isn’t overly complex.

Once the shopper has provided all the necessary details, the payable amount becomes visible. The complete calculation is revealed when the shopper clicks the “Next” button. The initial step involves entering the details, and in the subsequent step, the payable amount is displayed.

For those using a single-page checkout theme, all the information is visible on a single page without the need for a “Next” button. However, there could be situations where the order summary doesn’t automatically update to reflect the chosen shipping charges.

Let’s illustrate this with a simple example: Your standard shipping costs $5, and there’s an option for super-fast shipping at $10. If a shopper chooses the super-fast option ($10), the checkout summary might still display $5, not reflecting the chosen faster shipping cost.

The problem arises with the single-page checkout theme because it doesn’t update this in the order summary, potentially causing problems during checkout. If you’re having trouble updating your checkout summary after selecting a shipping method, I’ve got a solution just for you!

Improve Checkout Summary When Choosing Shipping Method in Magento 2

Simply insert this file into your theme path: ‘Magento_Checkout/js/action/set-shipping-information’.

This Code:


define(
[
	'../model/quote'
],
function (quote) {
	"use strict";
	return function (shippingMethod) {
        quote.shippingMethod(shippingMethod)
	}
}
);

This will happen:


define(
[
	'../model/quote'
],
function (quote) {
	"use strict";
	return function (shippingMethod) {
        quote.shippingMethod(shippingMethod)
	}
}
);

This file initiates an action concerning shipping information, which in turn updates the cart total as chosen by the shopper. That’s all there is to it! By adding this file, you can accomplish the task smoothly. Don’t hesitate to give it a try!

Recently, I’ve observed that numerous Magento store owners are choosing single-page checkout. It’s convenient as it gathers all necessary information in one spot, reducing cart abandonment rates and notably boosting conversion rates. Incorporating this file will seamlessly update your checkout summary when shoppers select a shipping method in Magento 2 on your store.

If you have any questions about the solution or encounter any problems while following these steps, please feel free to leave a comment.

Conclusion:

If you find the process of updating shipping methods in Magento 2 daunting or need expert assistance, consider reaching out to Evrig Solution, your trusted Magento 2 development company. With their specialized knowledge and experience, they can efficiently handle all your Magento 2 needs, ensuring your online store operates smoothly and your customers receive a seamless shopping experience. Evrig Solution specializes in Magento 2 development, offering comprehensive solutions to enhance your e-commerce platform.