Pre-select a shipping method

Permalink Browser Info Environment
Hi,
In the check process, how can I set the first shipping method radio button to selected when the page loads?

Cheers,

Nathan.

Type: Discussion
Status: New
nathanfriend
View Replies:
Mainio replied on at Permalink Reply
Mainio
Hi Nathan,

I guess you mean a situation where you have more than one regional rates defined for a specific shipping area, right?

If this is the case, unfortunately this is not in our hands as this is related to the eCommerce add-on itself. What it allows us to do is to return one or multiple shipping rates and then eCommerce lets the end user decide which one to select if the shipping module returns more than one shipping rate.

But the file you need to override from that add-on is:
/packages/core_commerce/elements/checkout/shipping/method.php

Please keep in mind that it already pre-selects the shipping method if you've selected it already for that order. So your pre-selection of the first option should not probably prevent the default behavior.

Other option (which probably wouldn't require any overrides) would be to attach to some of the eCommerce events and pre-select a shipping method at some step before the shipping methods step but this might be quite more challenging task compared to the previous suggestion.

Best,
Antti / Mainio
nathanfriend replied on at Permalink Reply
nathanfriend
Thanks you for the advice, as I'm not sure how to best edit the method override, I'm going to ask on the e-commerce forum.

Cheers,

Nathan.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.