When the flatrate module is enabled and a default shipping flat rate is entered, you can override this value on a per product basis. To revert to the default shipping rate the text in the box "Flat shipping rates" says:
"Override the default shipping rate per product for each flat rate shipping method here. Enter -1 to revert to the default value."
This is wrong. After entering -1 there will be a shipping rate of -1.0000 € (or whatever currency you use). Thus the flat shipping rate for an order will be deducted by this 1 € if that product is in the shopping cart.

The correct handling is to clear this field when you save the product. An the text should read something like this:

"Override the default shipping rate per product for each flat rate shipping method here. Remove this value to revert to the default value."

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

GuyPaddock’s picture

Status: Active » Needs review
FileSize
1.01 KB

Attached is a patch to fix the verbiage in this section. The text change will need to be translated.

saccard’s picture

Thanks!

Here a suggestion for the german text:
"Hier können die Standard-Versandkosten pro Artikel (für alle pauschalen Versandkosten) überschrieben werden. Feld leer lassen, um den Standardwert zu verwenden."

TR’s picture

Status: Needs review » Fixed

Fixed in 6.x-2.x-dev and 7.x-3.x-dev.

TR’s picture

Version: 6.x-2.2 » 7.x-3.x-dev
SeanA’s picture

Status: Fixed » Active

The same text needs to be changed in uc_weightquote.

There's also this bug. Does it make sense to allow negative shipping rates? Suggestion for uc_flatrate and uc_weightquote:

- if ($rate !== '') {
+ if ($rate !== '' && $rate > 0) {
TR’s picture

OK. Fixed the text for uc_weightquote as well in both the 6.x and 7.x branches.

Rate probably shouldn't be negative, but doesn't have to be > 0! Also, $rate !== '' seems like a bad idea to me - what if someone has a space in that field, that would be "invisible" but would not override the default rate. Very hard to track down a problem like that. Probably should check if $rate is numeric and non-negative instead.

SeanA’s picture

Right, I see now... if the default is 5.00, you might want to override that and set it to zero for certain items. Currently, if you enter a space (or other non-numeric characters) in the field, it becomes 0.00000 and so it will override (and will show up as 0.00000 in the field).

if ($rate !== '' && $rate >= 0) { // contains something and is a non-negative number

longwave’s picture

Status: Active » Fixed

if (is_numeric($rate) && $rate >= 0) { committed to both branches.

Status: Fixed » Closed (fixed)

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