View Issue Details

IDProjectCategoryView StatusLast Update
0006699OXID eShop (all versions)2.3. Extensions (modules, themes)public2024-04-17 08:07
ReporterAlexN Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version4.10.4 / 5.3.4 
Summary0006699: Two issues with the serialized basket
DescriptionIn my case I have extended oxBasketItem to override the method getTitle().

1) Changes to an extended oxBasketItem class does not take effect when a shop user added articles to the basket already

Let's say a user is browsing the shop and added articles to basket already. Then a module extending oxBasketItem is activated which displays the title different. For example no "varselect" as in my case. The user won't see the updated title unless he removes every article and re-adds them.


2) Validation the basket fails when deactivating a module which extends the basket


As long as the module is active, shop users can browse the shop without problems. However, should the module be deactivated and a shop user tries to open any frontend page following message is returned to the user:

---
Fatal error: oxSession::_validateBasket(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "TroFlow_Model_TroOxBasketItem" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in [...]/core/oxsession.php on line 639
Steps To Reproduce1) Changes to an extended oxBasketItem class does not take effect when a shop user added articles to the basket already

- create a new module which extends oxBasketItem and overrides method getTitle
- open the shop and add an article to the basket
- activate the module in the backend
- reload the basket page
--> you should not see the changed title

2) Validation the basket fails when deactivating a module which extends the basket
- remove the article from basket
- add a new article to the basket
--> you should see the new title now
- deactivate the module
- open any shop page
--> you should receive a message like in the description
TagsBasket, Module, Session
ThemeNot defined
BrowserNot defined
PHP Version5.6
Database VersionNot defined

Activities

SvenBrunk

2024-04-17 08:07

administrator   ~0016780

The general reason for this is a legal requirement: Once the customer put something into the basket there are very strict requirements if the content should be changed by the shop owner (UWG, reliable information for the customer that he saw when putting things in). That is why the basket was persisted in a similar way as the final order (which is even more protected by law).
We made some changes and will also iterate on this, but for the time being you need to clear our ALL baskets when changing something there. Be aware that this might annoy your customers as well. So you need to think very thoroughly before changing the basket in any way.