View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005474 | OXID eShop (all versions) | 4.01. Database handling | public | 2013-10-16 10:39 | 2013-11-14 12:20 |
Reporter | martinwegele | Assigned To | |||
Priority | immediate | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.7.0 / 5.0.0 revision 51243 | ||||
Target Version | 4.7.10 / 5.0.10 | Fixed in Version | 4.7.10 / 5.0.10 | ||
Summary | 0005474: oxfield2shop is not cleaned any more | ||||
Description | In 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 Reproduce | 1. 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. | ||||
Tags | Subshops | ||||
Attached Files | |||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
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. |
|
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. |