Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The no_discount feature is not being checked properly and all products will receive a discount if a role discount applies.
The issue seems to be that product_specials_get() in product.inc always applies the discount.
Comment | File | Size | Author |
---|---|---|---|
#2 | product.inc2_.diff | 270 bytes | mbennett |
#1 | product.inc_.diff | 131 bytes | mbennett |
Comments
Comment #1
mbennett CreditAttribution: mbennett commentedNo discount was broken due to a typo in product.inc. no_discount had an 's' on the end which meant it didn't match.
The line:
if (!(product_attributes_get($node, 'no_discounts'))) {
Should be:
if (!(product_attributes_get($node, 'no_discount'))) {
Comment #2
mbennett CreditAttribution: mbennett commentedThe patch has been updated so that another bug in the same function (product_specials_get) is fixed.
$total = 0 should be returned if no discounts exist.