There's a patch in commerce_flat_rate issue queue that lets store administrator to select default flat rate shipping service that will be presented to the user here #1612702: Add support for default flat rate service.

Patch in comment makes this happen.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kotnik’s picture

googletorp’s picture

Status: Active » Needs work

That code won't work for multiple shipping services.

kotnik’s picture

Status: Needs work » Active
FileSize
1.92 KB

Yes, but it will ignore shipping services that do not support them.

PS. Patch attached fixes the case when line item already has shipping set.

googletorp’s picture

Status: Active » Needs work

The problem is, that it's pretty random what value is chosen as default value, since it will be whatever shipping service that is loaded last which will determine the default value. I haven't looked closely into the code, but it's clear that this needs work.

kotnik’s picture

It most definitely does.

This is solid only if one is using flat rate service with the patch from #1612702: Add support for default flat rate service.

But I guess there's a need for an option like this.

googletorp’s picture

Status: Needs work » Closed (won't fix)

I'm not sure if this is a good idea or not - but seeing that no one is willing to work on this and I'm not sure about it I'm going to mark this as won't fix.

It would be easy with form alter to set a default option. I believe the the first method in the list is treated as a default option anyways - so being able to set the order would fix this anyways.

If anyways feel like it would be better to do something like this and provide a better patch or talk about it - feel free to reopen the issue or create a new.