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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rcodina’s picture

Title: Add rate per weight to flate rate » Add rate per weight option
rcodina’s picture

Status: Active » Needs review
FileSize
7.84 KB

I enclose the patch. It also allows you to specify the weight unit like is seen in screenshot.

rszrama’s picture

Priority: Major » Normal
Status: Needs review » Fixed

While 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.

rcodina’s picture

@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.

rszrama’s picture

I 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.

rcodina’s picture

I'm not sure that overloading the flat rate service table is the thing to do here.

I 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.