1

how to change the title of flat rate -fixed to Shipping

enter image description here

4
  • what text exactly you want to change ..you want to change particular method title or you need to remove whole selected text to some other text whatever shipping method is – ParulThakkar Jun 9 '20 at 6:28
  • i want to remove (Flat Rate -Fixed) From Cart Summary – Jay Parmar Jun 9 '20 at 6:30
  • yes but for all shipping method ? – ParulThakkar Jun 9 '20 at 6:35
  • no only for slate rate fixed – Jay Parmar Jun 9 '20 at 9:38
3
vendor/magento/module-checkout/view/frontend/web/js/view/cart/totals/shipping.js 
  • this path is for cart page only override this file in your theme and change this

getShippingMethodTitle: function () {
            return '(custom title)';
        }


4
  • but that title change from all site i am changing only one – Jay Parmar Jun 9 '20 at 9:53
  • check I have edited my answer – ParulThakkar Jun 9 '20 at 10:13
  • pub/static folder is a temporary folder it will regenerate on every static-content-deploy it is not recommended at all to make changes inside the pub/static files. – Sanjib Chowdhury Jun 9 '20 at 10:27
  • @SanjibChowdhury : I already mentioned that you need to override above file – ParulThakkar Jun 9 '20 at 10:37
0

You can have a look at the code vendor/magento/module-tax/view/frontend/web/template/checkout/cart/totals/shipping.html and vendor/magento/module-tax/view/frontend/web/template/checkout/summary/shipping.html

you need to override these files in your theme and do the necessary changes on that.

Function getShippingMethodTitle() is responsible to show the name over there.

4
  • can you please guide me how the getShippingMethodTitle() – Jay Parmar Jun 9 '20 at 10:04
  • the function is in vendor/magento/module-tax/view/frontend/web/js/view/checkout/cart/totals/shipping.js please go and check. – Sanjib Chowdhury Jun 9 '20 at 10:06
  • how to remove the (Flate Rate -Fixed) from cart summary simple – Jay Parmar Jun 9 '20 at 10:17
  • remove getShippingMethodTitle() function call from tax/view/frontend/web/template/checkout/cart/totals/shipping.html and vendor/magento/module-tax/view/frontend/web/template/checkout/summary/shipping.html – Sanjib Chowdhury Jun 9 '20 at 10:23

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.