Closed (fixed)
Project:
quantity_discount
Version:
5.x-0.1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
14 Oct 2007 at 22:57 UTC
Updated:
16 Feb 2008 at 04:41 UTC
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
Comment #1
mariuss commentedHere is the corresponding e-Commerce/Role Discount bug report:
http://drupal.org/node/183461
Comment #2
janusman commentedLooking at the best way to fix this...
Comment #3
janusman commentedFixed! Will post new version soon.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.