View Issue Details

IDProjectCategoryView StatusLast Update
0007360OXID eShop (all versions)4.12. Subshop handlingpublic2024-06-27 11:46
Reportermichael_keiluweit Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version6.5.0 
Target Version8.0.0 
Summary0007360: Lists models aren't using the table oxfield2shop
DescriptionWithin 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.
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).
TagsDatabase, EE, Subshops, Views
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Relationships

has duplicate 0006137 closed OXACTIVE in oxfield2shop is not used 

Activities

QA

2022-09-20 12:37

administrator   ~0014319

Dear Mr. Keiluweit,

thank you for reaching out to us.

I can confirm this.

Best Regards
QA - SG -

SvenBrunk

2023-10-31 11:56

administrator   ~0015711

This will be done in another context. Since our tools keep re-adding this as ticket for the Development Team, I am closing this ticket in this place.