Question

In order summary (Cart page), Shipping Method is displayed as:

(Method Name - Method Title)

Is it possible to remove Method Title and display just the Name?

enter image description here

Was it helpful?

Solution

Please override your file

vendor/magento/module-checkout/view/frontend/web/js/view/summary/shipping.js

to

/app/design/frontend/Vendor/ThemeName/Magento_Checkout/web/js/view/summary/shipping.js

Change Below Function Your Theme

 getShippingMethodTitle: function () {
        var shippingMethod,
            shippingMethodTitle = '';

        if (!this.isCalculated()) {
            return '';
        }
        shippingMethod = quote.shippingMethod();

        if (typeof shippingMethod['method_title'] !== 'undefined') {
            shippingMethodTitle = shippingMethod['method_title'];
        }

        return shippingMethod ? shippingMethodTitle : '';
    },
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top