View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006797 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2018-02-22 21:49 | 2018-02-23 09:45 |
Reporter | henrik.steffen | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Product Version | 4.10.7 / 5.3.7 | ||||
Summary | 0006797: Random order in voucher discount recalculation leads to changing order amounts in admin backend upon saving | ||||
Description | It's a difference if you apply a percentual voucher after an absolute voucher or the other way round. Example: Basket amount: 100,00 € Apply a 10 € absolute voucher: 90,00 € Apply additional 10 % percentual voucher: 81,00 € If however you'd add the voucher codes in opposite order the calculation gives this: Basket amount: 100,00 € Apply 10 % percentual voucher: 90,00 € Apply additional 10 € absolute voucher: 80,00 € As you see, the order amounts differ by 1 €, even though the same voucher codes where used. This is a funny fact for the customer, if he'd ever try to play with the order in which vouchers are added to the basket. But in the OXID backend it gets really ugly, and this should be considered a serious bug: Order recalculation in admin backend applies vouchers in a RANDOM order, this means, not in the same order as the customer entered his voucher codes. So, the order total amount could change by simply saving the order again in admin backend order section (except on the main tab where discount recalculcation is not performed). So, when trying to capture the order on credit cards or similar, the amount might differ, which could result in a capture error, if the order amount increased or changed. | ||||
Additional Information | To solve: application/models/oxorder.php $sQ = 'select oxid from oxvouchers where oxorderid = ' . $oDb->quote($this->getId()); add an "order by oxreserved" to the query statement, so the same order will be used as when the user entered the voucher codes in the shop frontend. | ||||
Tags | Price Calculation, Solution Provided, Voucher | ||||
Attached Files | |||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||