View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006285 | OXID eShop (all versions) | 4.12. Subshop handling | public | 2015-12-11 10:29 | 2016-02-09 11:16 |
| Reporter | michael_keiluweit | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | unable to reproduce |
| Status | closed | Resolution | unable to reproduce | ||
| Product Version | 4.9.6 / 5.2.6 | ||||
| Summary | 0006285: The field "OXLONGDESC" will ignored by oxfield2shop functionality | ||||
| Description | Currently 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 Reproduce | 1. 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 Information | By 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. | ||||
| Tags | Article, EE, Multi Shop | ||||
| Theme | Not defined | ||||
| Browser | Not defined | ||||
| PHP Version | Not defined | ||||
| Database Version | Not defined | ||||