View Issue Details

IDProjectCategoryView StatusLast Update
0004757OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2012-12-18 12:05
Reporteritsabug Assigned To 
PriorityurgentSeveritycrashReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.7.1 / 5.0.1 revision 52468 
Summary0004757: Still wrong item discount calculations
Description(First i was making false assumptions, thinking my false payment discount was based on 0003587.
Now i'm 100% sure it's also because of this bug thats still exists, even in 4.7.1):

If you add an item to a discount, calculation differs from normal discount calculation.


Steps To Reproduce1. Create a discount.
2. Give it 30% reduction. Keep first 4 rules checked.
3. Set appropriate ranges to make it active.
4. Go to Shop and add an item to basket, like 100 times so that you reached a 4-digit price or higher.
5. Go to Basket and look at the price.
6. Add this item to your discount
7. Go Back to basket and refresh it.
8. See how the overall price slightly changes. This was much worse in earlier versions with very hugh differences.

Hope you can reproduce this. I always can.
Additional InformationTried it on naked 4.7.1 with default out of the box discount and products. (art no. 3788)
If it won't work with 1 discount, try it with 2 discounts and give them both items.
TagsDiscount
Attached Files
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Relationships

has duplicate 0004758 closedjurate.baseviciene Discount which applies only to one product category doesn't affect payment surcharge/discount 

Activities

henrik.steffen

2012-11-29 08:23

reporter   ~0008022

I think this is because, when discounts are limited to categories or products, these discounts will be applied directly on product item level on the rounded two decimal price. While when a discount is not limited on categories/products it will be applied to the whole total order amount, which is not rounded before.

So we have two different calculations:

Example 1 - discount applied on product level:

Buy 100 pieces for 9,99 EUR each with 10 % discount:
100 * (9,99 - 10 %) = 100 * 8,99 EUR = 899,00 EUR


Example 2 - discount applied on basket:

Now OXID calculates 100 * 9,99 EUR and applies 10 % discount at the end. So you'll get 999 EUR * 0,9 = 899,10 EUR

This gets even worse with 1000 pieces or more



In older OXID versions this looks very weird as in screenshot, where 10% are discounted from 2.997,00 EUR order sum and displayed as -300,00 EUR discount.

In newer OXID versions the product/category specific discounts are displayed "inline"... see second screenshot. This makes it better from a usability point of view, but I am not sure, if it's really right from calculation point of view.

Linas Kukulskis

2012-12-18 12:05

reporter   ~0008154

from 4.7/5.0 discount with assigned product or category goes directly to products basket price, but not into totals.