Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Could be possible to add a rate per weight field into this module (see screenshot)? In the first comment I will enclose a patch I've done and it's working on our site.
Comment | File | Size | Author |
---|---|---|---|
#2 | add_rate_per_weight-2345427-1.patch | 7.84 KB | rcodina |
newRatePerWeight.png | 80.5 KB | rcodina |
Comments
Comment #1
rcodina CreditAttribution: rcodina commentedComment #2
rcodina CreditAttribution: rcodina commentedI enclose the patch. It also allows you to specify the weight unit like is seen in screenshot.
Comment #3
rszrama CreditAttribution: rszrama commentedWhile I understand the rationale behind this feature request, I'm not sure it's necessary to patch this module to support weight based shipping. Instead you should use a rate calculation rule to outright set the rate (or multiply the base rate) by the total weight of the order. If this isn't already supported, let's add the necessary token to the order property info via Commerce Physical Fields.
Comment #4
rcodina CreditAttribution: rcodina commented@rszrama I understand but my approach is much easier for users than creating rules. I think Commerce depends too much on rules, making things too complicated and not as user-friendly as it could be.
Comment #5
rszrama CreditAttribution: rszrama commentedI can definitely sympathize with that. My preferred option is to create user interfaces on top of Rules where appropriate that uses Rules for data storage but provides a rational UI for a merchant. It takes a bit more work, but I'm not sure that overloading the flat rate service table is the thing to do here.
Comment #6
rcodina CreditAttribution: rcodina commentedI understand your point of view but sometimes it's annoying to have to install many modules to do things which may be considered basic for a commerce. Also, it would be more handy and user-friendly to have Flate rate rules combined with physical rules.