View Issue Details

IDProjectCategoryView StatusLast Update
0006213OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2015-09-11 09:58
Reporterfcos Assigned To 
PrioritynormalSeverityminorReproducibilityunable to reproduce
Status closedResolutionunable to reproduce 
Product Version4.7.8 / 5.0.8 
Summary0006213: Wrong Voucher Calculation - session basket mixing
DescriptionHi,

one of our customers has a serious problem with the voucher calculation if the voucher calculation is set on percentual and categories or articles are assigned.

I added some logging to "oxvoucher::_getSessionBasketItems" and it seems that sometimes the basket items that are used for calculation, are coming from another basket that was added prior or after the actual basket. Its hard to determine wich basket was first. There complete different baskets with different session ids. That can cause huge loss and customer problemens.

The shop is higly customized and has a load balancer setup with memchache..., so yeah the chances are high that its because of that, but i also found a suspicious part in oxvouchers::_getSessionBasketItems.

I also cant reproduce that problem on my local machine or in the stage enviroment it only happens live with high traffic/order rate.

The items for calculation are coming from an basket that was set with "$this->getSession()->getBasket()", but that part of the voucher calculation is only called in "oxbaskte::_calcVoucherDiscount". Wouldn it be better/safer to directly pass the oxbasket object to "getDiscountValue()" instead of retrieving it over the session?
I think that this part cause the problems (maby in combo with the high performance server setup).

Would it be safe if i just fix it with an module and pass the basket directly to the methods or is there a special reason that the basket needs to be set with "$this->getSession()->getBasket()"?

I hope you can help me. (and that its clear what i meant^^)

Greatings,
Oliver
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP Version5.3
Database VersionNot defined

Activities

QA

2015-08-07 17:00

administrator   ~0011162

Reminder sent to: fcos

Please supply a way to reproduce this issue.

hendrikfreytag

2015-09-01 10:14

reporter   ~0011197

No feedback for 2 weeks -> closed as not reproducible.