The _product_specials hook ignores other specials that may be set by other modules.

Instead of returning a new array like return array('special' => $discounts); it should add an entry to the $specials array argument that was passed into the function and return the result. Also, instead of using a generic key like 'special', which can collide with keys set by other modules, use a more specific key:

$specials['quantity discount'] = $discounts;

return $specials;

The Role Discount module for example will definitely conflict with Quantity Discount. Whichever happens to be processed last will overwrite the discount set by the other (Role Discount also has this very same bug).

Comments

mariuss’s picture

Here is the corresponding e-Commerce/Role Discount bug report:
http://drupal.org/node/183461

janusman’s picture

Assigned: Unassigned » janusman

Looking at the best way to fix this...

janusman’s picture

Status: Active » Fixed

Fixed! Will post new version soon.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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