We have two shipping methods



We want to show only one shipping method at time based on our custom order sequencing rule. at the same time want to change price(dynamically) of shipping methods based order sequencing rule. for more clarity. you can see image.

enter image description here

  • please check your admin settings store/configuration/sales/shipping-settings turn on/off methods and change other settings as per your needs thanks Jul 6, 2017 at 4:53
  • Thanks but at file level where and which file is need to override ? Could you please tell me? Jul 6, 2017 at 5:04

1 Answer 1


The class Magento\Quote\Model\Quote\Address has the function collectShippingRates, this is responsible for shipping methods. You can try with this class by overriding.

  • how can change rate of shipping method and make available only one shipping method at time? methods and their price will change based on my condition so how i can do that? Jul 6, 2017 at 5:59
  • 1
    when you check requestShippingRates() function in Magento\Quote\Model\Quote\Address class, you can see the line called $shippingRates = $result->getAllRates(); . This contains the complete array of the shipping rates. You can use that foreach to control each rate Jul 6, 2017 at 6:11

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.