View Issue Details

IDProjectCategoryView StatusLast Update
0006285OXID eShop (all versions)4.12. Subshop handlingpublic2016-02-09 11:16
Reportermichael_keiluweit Assigned To 
PrioritynormalSeverityminorReproducibilityunable to reproduce
Status closedResolutionunable to reproduce 
Product Version4.9.6 / 5.2.6 
Summary0006285: The field "OXLONGDESC" will ignored by oxfield2shop functionality
DescriptionCurrently there is a check if a item of the array $aMultishopArticleFields has the fieldname "oxlongdesc" to save it into oxfield2shop:

oxField2Shop::saveProductData

public function saveProductData($oProduct)
{
    foreach ($this->_getMultiShopFields() as $sField) {
        //code
        if ($sField === "oxlongdesc") {
            //code
        } elseif (isset($oProduct->{"oxarticles__{$sField}"})) {
            //code
        }
    }
...


But later the field oxlongdesc is missing while updating or inserting it into the table oxfield2shop. It will also not considered while loading the article object.
So it is not possible to have different long descriptions for one article in different subshops
Steps To Reproduce1. Add the fieldname oxlongdesc to the array $aMultishopArticleFields in the file config.inc.php
2. create the field in the table oxfield2shop
OXLONGDESC | Text | utf8_general_ci | Null: No | Default: |
3. create a subshop and let it have all the articles of the parentshop.
4. edit the long desc of one article in the subshop.
5. open the frontend of the parent- and the subshop and have a look at the article. The longdesc text is still the same as from the parentshop.
Additional InformationBy ignoring the multilanguage handling it is possible to force the shop to load the field from the table oxfield2shop by adding the fieldname explicitly:


\oxArticle::_setShopValues

Change:

$oField2Shop = oxNew("oxfield2shop");
$oField2Shop->setEnableMultilang($this->_blEmployMultilanguage);

To:

$oField2Shop = oxNew("oxfield2shop");
$oField2Shop->addFieldName('oxlongdesc');
$oField2Shop->setEnableMultilang($this->_blEmployMultilanguage);


\oxField2Shop::saveProductData

Change

if ($sField === "oxlongdesc") {
    $this->{"oxfield2shop__{$sField}"} = clone $oProduct->getLongDescription();

To

if ($sField === "oxlongdesc") {
    $this->{"oxfield2shop__{$sField}"} = clone $oProduct->getLongDescription();
    $this->addFieldName('oxlongdesc');


Please note that this isn't an official workaround and therefore it isn't tested for using it on live shops.
TagsArticle, EE, Multi Shop
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

QA

2016-02-09 11:16

administrator   ~0011459

Behaviour is not reproducable.