0

We have two shipping methods

1.Yamato

2.Gdex

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

2
  • 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 '17 at 4:53
  • Thanks but at file level where and which file is need to override ? Could you please tell me? Jul 6 '17 at 5:04
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.

2
  • 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 '17 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 '17 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.