View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005910 | OXID eShop (all versions) | 1.03. Basket, checkout process | public | 2014-10-07 16:03 | 2014-11-11 09:07 |
Reporter | aurimas.gladutis | Assigned To | |||
Priority | immediate | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.7.14 / 5.0.14 | ||||
Target Version | 4.8.9 / 5.1.9 | Fixed in Version | 4.8.9 / 5.1.9 | ||
Summary | 0005910: When out of stock articles exists in basket and language is changed, shop for that session goes offline. | ||||
Description | When out of stock articles exists in basket and Delivery status is "if out of stock, not orderable" (have not checked with others) and language is changed, shop for that session goes offline. This happens because unhandled exception is thrown in oxbasketitem. | ||||
Steps To Reproduce | 1. Go to admin and set any product's stock to 1 and Delivery Status to "if out of stock, not orderable". 2. User1: Go to frontend and add this item to basket. 3. User2: Go to frontend with different browser and buy this item (to immitate article going offline for the first user). 4. User1: change frontend language. Shop will go offline for this user, as unhandled exception is thrown. For other users shop will still work. | ||||
Additional Information | When language is changed basket item is trying to reload it's info, but does not handle exceptions correctly. Problematic method is oxbasketitem::setLanguageId(), as oxbasketitem::_setArticle() throws exception when article is not buyable. This exception is not handled and goes all the way to main exceptions handler, which causes shop to go offline for this session. | ||||
Tags | Stock, User Management | ||||
Theme | Azure | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
Added exception handling in oxbasketitem:setLanguageId() method when calling oxbasketitem::_setArticle(): try { $this->_setArticle($this->getProductId()); } catch (oxNoArticleException $oEx) { oxRegistry::get("oxUtilsView")->addErrorToDisplay($oEx); } catch (oxArticleInputException $oEx) { oxRegistry::get("oxUtilsView")->addErrorToDisplay($oEx); } |