View Issue Details

IDProjectCategoryView StatusLast Update
0005474OXID eShop (all versions)4.01. Database handlingpublic2013-11-14 12:20
Reportermartinwegele Assigned To 
Status resolvedResolutionfixed 
Product Version4.7.0 / 5.0.0 revision 51243 
Target Version4.7.10 / 5.0.10Fixed in Version4.7.10 / 5.0.10 
Summary0005474: oxfield2shop is not cleaned any more
DescriptionIn Article_Mall::assignToSubshops there is a call for oxShop::cleanMultishopFields(). It seems that this does not work any more because if you delete an assignment and re-add it afterwards the entry in the oxfield2shop table is not removed and will therefore be used again. so it is impossible to get rid of inherited fields (in oxfield2shop) any more once they were added! The only way to remove them is to do it directly in the DB which is not good.
Steps To Reproduce1. In an EE create a subshop that inherits all articles.
2. In the subshop modify the price of an article. (creates an entry for this article in oxfield2shop)
3. In the mastershop now remove the assignment of this article to the subshop (this removed the entry from oxfield2shop in 4.5.x and 4.6.x).
4. If you assign the article again to the subshop it will not inherit the price from the mastershop again but instead will use the "old" entry from oxfield2shop.
Attached Files
Bug5474.JPG (36,180 bytes)   
Bug5474.JPG (36,180 bytes)   
PHP Versionany
Database Versionany



2013-10-16 13:33

developer   ~0009159

In application\models\oxshop.php row 479
public function cleanMultishopFields( $sArticleID = null ) ...

wrong $sShopId is selected ($sShopId = $this->getId();)

and the query im row 492 ... 498 will provide an empty query.
So nothing to delete in oxfield2shop.

See screenshot attached.


2013-10-16 13:55

reporter   ~0009161

Last edited: 2013-10-16 13:56

Eike is right:
This problem occurs because since 5.0 cleanMultiShopFields() was moved from oxdb to oxshop and now does not loop through all (sub)shops but instead only performs the action for the current (master)shop.