Menu Close
    Hire us Request quote Reading list Switch to dark mode

    How to add custom price/fee in order total magento2

    If you want to add custom price/custom fee in your total, then you can use following approach.

    create sales.xml in you module etc folder


    Now, define app\code\Webkul\Test\Model\Total\Customfee.php, where you update your total according to your custom fee.

    . . .

    Comments (6)

    Add Your Comment

  • vinit kumar
    HI can you explain why you have used Sales.xml
  • Vinit
    Is above code For extra fee will work with PayPal Express Checkout ?
  • Arsalan Ajmal
    Hi Thanks for your article It works great. Now can you help me about how to set my custom price at cart subtotal in checkout summary? As I want to change cart subtotal on fly after saving shipping rates information.
  • Display custom price fee on checkout cart and summary total in magento2
    […] How to add custom price/fee in order total magento2 […]
  • How to display custom price fee in sales order view page
    […] How to add custom price/fee in order total magento2 […]
  • Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just received your message and our expert will get back to you shortly.
    Send Again
    Close