Hi,

I want to create shipping rule(s) that, depending on the total weight of the order, it will activate a different flat rate charge.
I added the weight field to the product and I already created various shipping rules depending on the total amount of the cart / destination to provide free shipping.

What I cannot find out is how I can sum up the weight field of all products inside a rules condition

i.e.
Total order > 100$ && destination X => free (done)
Total order < 60$ && destination Y => 5$ (done)
...
Total order < 100$ && destination X && Total weight > 10 Kg => 10$ shipping (???)
Total order < 60$ && destination Y && Total weight > 5 Kg => 5$ shipping (???)
...

Thanks in advance,
Regards
DImitris

Comments

googletorp’s picture

I would use code and a custom shipping method, but that's just me.

It might be possible with Rules, I wouldn't know how to do it though.

For help on using rules, please go to the rules documentation/issue queue/etc.

googletorp’s picture

Status: Active » Closed (won't fix)
jimkont’s picture

Thanks for the help!

using this thread (http://drupal.org/node/1214378)
I created a custom module that provides a new rule (total weight) with an option to compare it with a number.

This way, you can create a shipping rule that takes the total order weight into account.

the code is in github (in case anyone cares)
http://github.com/jimkont/drupal-commerce-order-weight-rule

Best,
Dimitris

nocean’s picture

Thanks for this Dimitris, is there any way to expose the total weight so that it can be used in actions (ie. to calculate a rate based on the total weight)?

Tamanda’s picture

Thank you, (jimkont/Dimitris) custom module that provides a new rule worked for me. I still have some other work around it but you helped solve a major major head-ache. Thanks!