View Issue Details

IDProjectCategoryView StatusLast Update
0004935OXID eShop (all versions)4.07. Source code, Testpublic2023-11-29 15:21
Reporterdominik_ziegler Assigned To 
Status resolvedResolutionfixed 
Product Version4.6.6 revision 54646 
Summary0004935: oxBasketItem::getArticle returns oxOrderArticle instance instead of oxArticle
DescriptionCreating a new virtual basket from existing order with the code below results in errors when using select lists.

The method getBasketArticles of oxBasket iterates over the article objects, fetches the object via oxBasketItem::getArticle and tries to execute "getSelectlist", but instead of oxArticle it has an oxOrderArticle where this method does not exist.

Called in a method in oxOrder:
$basket = $this->_getOrderBasket();
$this->_addOrderArticlesToBasket($basket, $this->getOrderArticles(true));

$basket->getBasketArticles() causes an error.

I think the problem is, that oxBasketItem::initFromOrderArticle sets the object in the class variable _oArticle and then returns it with oxBasketItem::getArticle, although the method should only return oxArticle.
TagsNo tags attached.
ThemeAzure, Mobile
PHP VersionNot defined
Database VersionNot defined


related to 0006113 resolvedSvenBrunk getArticle method of oxbasketItem must be refactored 



2023-11-22 12:54

administrator   ~0015889

Last edited: 2023-11-22 12:55

@Sven Brunk: Not reproducible anymore (v7.0.0).



2023-11-29 15:21

administrator   ~0015985

The code was adapted and modified accordingly