View Issue Details

IDProjectCategoryView StatusLast Update
0005972OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2014-11-19 16:25
ReporterSpritje Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.9.1 / 5.2.1 
Summary0005972: Discount price calculation is wrong when "quantity from" is set from 0 to 1
DescriptionDiscount price calculation works if "quantity from" is set to 0. But the calculation is wrong when "quantity from" is set from 0 to 1.
Steps To ReproduceSet article price to 34,95 EUR.
Set discount 10% and quantity from 0 to 999999
Article price is now 31,46 EUR <- correct price, see additional information

Set discount 10% and quantity from 1 to 999999
Article price is now 31,45 EUR <- wronc calculation
Additional InformationArticle price: 34,95 EUR
Discount 10%: 3,495 EUR
Price: 31,455 EUR ~ 31,46 EUR correct price
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP Versionany
Database Versionany

Relationships

related to 0005993 resolvedjurate.baseviciene Discount does not show up in basket 

Activities

jurate.baseviciene

2014-11-19 16:25

reporter   ~0010333

Last edited: 2014-11-19 16:25

Hi
Thanks a lot for submitting this issue :) .

In both case calculation is correct. Because we calculate discount in the different way. It is depends what we set in quantity from 0 or from 1 to 999999.
Discounts are calculate in the different place (product details page and in the basket) and in the different way.

The first test case:If we have a set:
Product the price to 34,95 EUR.
Discount 10% and quantity from 0 to 999999
Article price is 31,46 EUR <- BECAUSE -we calculate it 34,95*10/100 then
equal is about ~ 31,455, we rounding it and getting 31.46.
In this case discount is apply in the product details page.

The 2nd test case: If we have a set:

Product the price to 34,95 EUR.
Set discount 10% and quantity from 1 to 999999
Article price is now 31,45 EUR <- because -we calculate it:
We have a unit price of product 34.95, then we calculate 10% discount from price 34.95 (-34.95*10/100)= -3,495), then from 34,95-3,5=31.45

In this case discount is apply in the basket.

Best regards,
Jurate