BUG: promotion discount not reflect in quantity discount list

Okay, I mentioned this bug before, but it doesn’t seem to be fixed in the latest version 2.0.8.



The promotion discount is not reflect in quantity discount list.



So if I had an item that is $10. The qty discount is $9 for 2+ and $8 for 4+.



However, if you have a promotional discount on the item, say for $3 off, it is not reflected on the qty discount list.



So your prices are $7 for 1 qty, $9 for 2+ and $8 for 4+.



Looks kinda silly for the quantity discounts list.





Anyway, here’s the quick fix.





in the core directory, modify the file “fn.catalog.php”.



Modify the function “fn_gather_additional_product_data”





Near the bottom of the function:



change:

```php



$product[‘qty_content’] = $qty_content;



fn_set_hook(‘get_additional_product_data’, $product, $auth, $get_options);

}

```





to:



```php $product[‘qty_content’] = $qty_content;



// Update product prices to reflect discount

if ($product[‘discount’])

{

if (is_array($product[“prices”]))

{

foreach ($product[“prices”] as $key => $prices) {

$product[“prices”][$key][‘price’] = $prices[‘price’] - $product[‘discount’];

}

}

}



fn_set_hook(‘get_additional_product_data’, $product, $auth, $get_options);

} ```

I can also confirm this as a bug as we are also experiencing the same exact issue on our site as explained above.



Thank you for the fix Hykit!

I was not able to find your post within the Bug Tracker, so I just added this as a new bug.