I build two Shipping services in a drupal commerce shop. One with calculated rates. One with 0€ for pickup by the customer. It looks like this: enter image description here But i would like to change the order and make shipping service with costs as default. I tried to change the wight of the calculation rules, but without effect. Is it true, that I need a module for this task? It would be no problem, but I don't won't to overlook a easy solution.

1 Answer 1


Unfortunately, there's a pending feature request to make these orderable via the user interface, but in the meantime you're dependent on code to change their ordering. The hook to use is hook_commerce_shipping_collect_rates(), and what you need to do is alter the weight value of the line items in the $order->shipping_rates array.

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.