简体   繁体   中英

Magento IWD Onepage checkout - set default shipping method

by default magento ( and this module ) show the shipping methods available only after the shipping form is filled.. but I need to show the methods on page load, before shipping infos. Is this possible? How? I have try so many code, but i can't implement this.

Last one, but i don't know where to put this.

$shippingAddress = $this->getQuote()->getShippingAddress();
$shippingAddress->setCountryId('UK')->setShippingMethod('matrixrate_matrixrate')-save();

I don't think it's possible to get all the shipping methods before filling in the shipping details.
In theory the shipping methods depend on the shipping details.
So even if you all the shipping methods you will get wrong prices.
And this is bad for business.
If the customer sees for example at first: Some shipping method: 5$ , then he fills in his shipping address and sees: Some shipping method: 15$ there is a big chance he will stop the checkout.

But I wrote this answer so I can recommend you not to use the IWD checkout extension. Here is why .
To summarize what I answered for that question:

  • the extension sends your data to their servers.
  • if their server is offline, your checkout will probably stop working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM