Closed (fixed)
Project:
Table Quote - Shipping cost based on total ranges
Version:
6.x-2.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
15 Mar 2010 at 17:30 UTC
Updated:
7 Jun 2010 at 17:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
autopoietic commentedI have created a patch against (6.x-2.0) which I think resolves this problem. The code is pretty much straight from the uc_weight module, instead of checking item weights from uc_cart_get_contents() I have used the $products object passed into the quote function.
After applying this patch Table Quote should convert product weights to use the store's default weight format before adding up the order's total weight.
IMPORTANT: this does mean that if the sites default weight unit is changed the rates returned by the Table Quote module will be drastically affected.
I suggest this should be resolved by either of the following options:
I prefer 1) as it may help administrators to set tables up according to different mail companies default weight unit.
Comment #2
autopoietic commentedComment #3
anrikun commentedNice patch but there are still mistakes:
- function signature is wrong. It should be:
- default uc_weight_unit should be "lb" (not "kg") like in other uc modules
This module is very useful but has many bugs, and some of them are critical.
Here is a patch that addresses several issues at once:
- fixes uc_tablequote_quote function signature
- adds autopoietic's patch (see above)
- adds #461444: Spelling mistake in module patch
- allows ranges like 'from 50kg to 60kg' next to 'from 60kg to 70kg', without complaining about them overlapping: min value is inclusive, max value is exclusive.
- fixes indentation, converting tabs to spaces
- fixes the critical #768924: Security bug: Module does not check any limit
Comment #4
anrikun commentedThese changes have been committed to the new 6.x-2.x-dev (http://drupal.org/node/772292).
Comment #5
plachShould not the issue status be changed to fixed then?
Comment #6
anrikun commentedYou're right! :-)