1

There doesn't seem to be a weight option. How would one reorder the shipping services for drupal commerce?

enter image description here

1 Answer 1

4

You can use a custom hook to reorder services:

<?php
/**
 * Implements hook_commerce_shipping_service_info_alter().
 */
function mymodule_commerce_shipping_service_info_alter(&$shipping_services) {
  if (isset($shipping_services['my_flat_rate'])) {
    $shipping_services['my_flat_rate']['weight'] = -10;
  }
}
?>

See discussion here: https://drupal.org/node/1537394#comment-7003814

Steps would be create a custom module or add this hook to existing module for your site, set the weight as code above ranging from -10 to 10 and you should be all set till there is a patch or update to overall Shipping module.

1
  • i guess ill just live with it for now. don't want to add more code bloat to the site. Sep 20, 2013 at 21: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.