View Issue Details

IDProjectCategoryView StatusLast Update
0004863OXID eShop (all versions)eFire connectorpublic2023-11-24 10:56
Reporteraurimas.gladutis Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0004863: When creating multilanguage multishop fields, efire connector does not take them correctly.
DescriptionWhen exporting articles with both multilanguage and multishop fields _getNextArticles() does not take oxfield2shop correctly. Instead of selecting directly from oxfield2shop it should take view name instead of table name ($this->_getViewName()) and add multilanguage fields to the selection, because now it only takes whats in aMultishopArticleFields array (it should add _1, _2, ... to multilanguage fields).

P.S. oxfield2shop views are generated corretly for multilanguage fields.

should look something like this:
$sField2ShopTable = $this->_getViewName( 'oxfield2shop' );
add multi language fields to sFieldsToSelect

$sAddQuery = " SELECT " . $sFieldsToSelect .
             " FROM $sField2ShopTable "...
Additional InformationFor each language they have one table for the multilanguage article fields , like:

oxarticles_set1 (de) Fields OXID, OXTITLE_1, OXSHORTDESC_1, OXVARSELECT_1, ...
oxarticles_set2 (en) Fields OXID, OXTITLE_2, OXSHORTDESC_2, OXVARSELECT_2, ...
oxarticles_set3 (fr) Fields OXID, OXTITLE_3, OXSHORTDESC_3, OXVARSELECT_3, ...
and so on.

The shop can work with this sets fine without problems.
Now they want the multilanguage field "oxvarselect" to have different values in their subshops.

So they added in config.inc.php array the fields "OXVARSELECT", "OXVARSELECT_1", "OXVARSELECT_2" ...

$this->aMultishopArticleFields = array("OXPRICE", "OXPRICEA", "OXPRICEB", "OXPRICEC", "OXUPDATEPRICE", "OXUPDATEPRICEA", "OXUPDATEPRICEB", "OXUPDATEPRICEC", "OXUPDATEPRICETIME", OXVARSELECT", "OXVARSELECT_1", "OXVARSELECT_2" ...);

So the shop can also works fine with these multishop language fields.

Problem now is the shop connector.
The tables oxfield2shop_set1, oxfield2shop_set2, ... will not be considered from the shop connector.
So the shop connector fails, because the shop connector always checks

$sFieldsToSelect = implode(', ', $this->getConfig()->aMultishopArticleFields);
SELECT " . $sFieldsToSelect . " FROM oxfield2shop "

and not if there are some oxfield2shop_setX tables.

So this is a bug.
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

aurimas.gladutis

2013-01-22 16:09

reporter   ~0008308

Added function _getArticleMultishopFields which returns article multishop fields with added multilanguage fields by given article and shop ids. This should fix the problem.