View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007360||OXID eShop (all versions)||4.12. Subshop handling||public||2022-09-20 12:33||2022-09-21 14:38|
|Target Version||Fixed in Version|
|Summary||0007360: Lists models aren't using the table oxfield2shop|
|Description||Within an Enterprise Edition a sub shop with a parent shop can have own defined values for an inherited object. Those values are stored in the table oxfield2shop (https://github.com/OXID-eSales/oxideshop_ce/blob/v6.12.0/source/config.inc.php.dist#L184).|
This table is used when an object is loaded by the method BaseModel::load. It selects all the data of the origin, except the fields which are defined in the oxfield2shop (\OxidEsales\EshopEnterprise\Application\Model\Article::_setShopValues).
The model ArticleList does not create a list of objects, but will create a select query to fetch basic data from the views, so that the objects can be later loaded by widgets. The select query uses the helper method \OxidEsales\EshopCommunity\Application\Model\Article::getSqlActiveSnippet which also reads from the views. The check if an product object is active contains queries for the status of oxstock, oxhidden and oxactive. Those fields are part of the table oxarticles and as a consequence, they could be also added to the table oxfield2shop.
The helper method getSqlActiveSnippet reads from the view and does not respect the table oxfield2shop so the frontend can get wrong information.
The purpose of the views is language handling only, so business logic data needs to be read from the core tables always.
|Steps To Reproduce||- in config.inc.php add OXACTIVE to $this->aMultishopArticleFields|
- create field OXACTIVE in oxfield2shop
- create subshop
- make Category Kiteboarding available in subshop
- deactivate Kiteboard NAISH MOMENTUM in mainshop
- activate Kiteboard NAISH MOMENTUM in subshop
- browse to category Kiteboards in main and subshop
- Kiteboard NAISH MOMENTUM is missing in subshop
Call the Kiteboard NAISH MOMENTUM by SEO URL directly and it will be shown as active in the frontend since the SEO handler loads the object by the method BaseModel::load (which reads from the core tables, instead of the views).
|Tags||Database, EE, Subshops, Views|
|PHP Version||Not defined|
|Database Version||Not defined|