View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005981||OXID eShop (all versions)||1.02. Price calculations (discounts, coupons, additional costs etc.)||public||2014-11-25 12:20||2015-12-01 10:15|
|Product Version||4.9.2 / 5.2.2|
|Target Version||Fixed in Version|
|Summary||0005981: Price of cheapest variant calculated incorrectly if oxvat of parent is set to 0|
|Description||If merchant enters net prices in oxid admin back-end ("blEnterNetPrice" enabled) and a non-buyable parent product is entered with oxvat 0, then for the buyable variant products with default vat of 19% the oxvarminprice is calculated incorrectly. |
According to OXID core source code the VAT rate of the parent is utilized to calculate the gross price of the cheapest variant.
In my opinion the VAT-rate of each variant has to be taken into account to determine the cheapest of all variants.... however, this has got nothing to do with the VAT-rate of the parent product, which isn't buyable at all.
|Tags||No tags attached.|
|PHP Version||Not defined|
|MySQL Version||Not defined|
||Maybe related to this bug: https://bugs.oxid-esales.com/view.php?id=5331|
Reminder sent to: henrik.steffen
Sorry we cant reproduce, can you describe steps how to reproduce more detail?
also this part:
"... then for the buyable variant products with default vat of 19% the oxvarminprice is calculated incorrectly. "
oxvarminprice - field always calculated only for parent products not for variants.
Ok, say you've got a non-buyable parent product with just 1 variant.
This variant costs 100,00 € net price (+ VAT of 19%), so in the shop a price of 119,00 € will be shown for this variant.
If the merchant accidently specified oxvat for the non-buyable parent product as "0", then OXID will use this 0% VAT-Rate to calculate the oxvarminprice of the parent product.
So shop front-end will display the product with a price of "from 100,00 €", instead of "from 119,00 €" which would be correct.
OXID determines the cheapest of all variants of the parent product, but then multiplies the oxprice of the variant with the oxvat of the parent. Instead, you should look for the cheapest product in all variants using oxprice plus vat depending on oxvat of the variant, and save this value to oxvarminprice of the parent instead.