View Issue Details

IDProjectCategoryView StatusLast Update
0006137OXID eShop (all versions)4.12. Subshop handlingpublic2017-02-14 11:40
Reporterhendrikfreytag 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version4.9.4 / 5.2.4 
Target VersionFixed in Version 
Summary0006137: OXACTIVE in oxfield2shop is not used
DescriptionIf want to you use oxfield2shop to have different values for oxactive in master shop and subshop, it doesn't work.
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 mastershop
- activate Kiteboard NAISH MOMENTUM in subshop
- browse to categorie Kiteboards in master and subshop
- Kiteboard NAISH MOMENTUM is missing in subshop

(If you enter the direct link to the article page, everything works fine.)
Additional InformationMaybe \oxBase::getSqlActiveSnippet has to check oxfield2shop for a different value of OXACTIVE
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP VersionNot defined
MySQL VersionNot defined

Activities

martinwegele

2015-04-28 16:57

reporter   ~0010920

Maybe related to 0005024?

s.krenz

2015-05-21 07:10

reporter   ~0010973

I had the same problem. After I cleared the whole cache, it's working as expected.

florian.auer

2015-05-21 16:00

reporter   ~0010978

Please provide a product version.

preethi

2017-02-14 11:40

developer   ~0011973

Possible Workaround:

application/models/oxarticle.php::getActiveCheckQuery()

Search:

// check if article is still active
$sQ = " $sTable.oxactive = 1 ";

Replace:

// check if article is still active
$sQ = " $sTable.oxactive = 1 ";
if (in_array("OXACTIVE", (array) $this->getConfig()->getConfigParam('aMultishopArticleFields'))){
    $sQ = " IF( (SELECT count(*) FROM $sF2SView
            WHERE $sTable.oxid = $sF2SView.oxartid
            AND ( $sF2SView.oxshopid = " . oxDb::getDb()->quote($this->getConfig()->getShopId()) . " )) > 0,
            (SELECT $sF2SView.oxactive FROM $sF2SView
            WHERE $sTable.oxid = $sF2SView.oxartid
            AND ( $sF2SView.oxshopid = " . oxDb::getDb()->quote($this->getConfig()->getShopId()) . " )),
            $sTable.oxactive = 1)";
}