22 array(
'oxartnum',
'oxarticles', 1, 0, 0),
23 array(
'oxtitle',
'oxarticles', 1, 1, 0),
24 array(
'oxean',
'oxarticles', 1, 0, 0),
25 array(
'oxmpn',
'oxarticles', 0, 0, 0),
26 array(
'oxprice',
'oxarticles', 0, 0, 0),
27 array(
'oxstock',
'oxarticles', 0, 0, 0),
28 array(
'oxid',
'oxarticles', 0, 0, 1)
30 'container2' => array(
31 array(
'oxartnum',
'oxarticles', 1, 0, 0),
32 array(
'oxtitle',
'oxarticles', 1, 1, 0),
33 array(
'oxean',
'oxarticles', 1, 0, 0),
34 array(
'oxmpn',
'oxarticles', 0, 0, 0),
35 array(
'oxprice',
'oxarticles', 0, 0, 0),
36 array(
'oxstock',
'oxarticles', 0, 0, 0),
37 array(
'oxid',
'oxarticles', 0, 0, 1)
55 $sManufacturerId =
$myConfig->getRequestParameter(
'oxid');
56 $sSynchManufacturerId =
$myConfig->getRequestParameter(
'synchoxid');
59 if (!$sManufacturerId) {
61 $sQAdd =
' from ' . $sArtTable .
' where ' . $sArtTable .
'.oxshopid="' .
$myConfig->getShopId() .
'" and 1 ';
62 $sQAdd .=
$myConfig->getRequestParameter(
'blVariantsSelection') ?
'' :
" and $sArtTable.oxparentid = '' and $sArtTable.oxmanufacturerid != " . $oDb->quote($sSynchManufacturerId);
63 } elseif ($sSynchManufacturerId && $sSynchManufacturerId != $sManufacturerId) {
65 $sQAdd =
" from $sO2CView left join $sArtTable on ";
66 $sQAdd .=
$myConfig->getRequestParameter(
'blVariantsSelection') ?
" ( $sArtTable.oxid = $sO2CView.oxobjectid or $sArtTable.oxparentid = $sO2CView.oxobjectid )" :
" $sArtTable.oxid = $sO2CView.oxobjectid ";
67 $sQAdd .=
'where ' . $sArtTable .
'.oxshopid="' .
$myConfig->getShopId() .
'" and ' . $sO2CView .
'.oxcatnid = ' . $oDb->quote($sManufacturerId) .
' and ' . $sArtTable .
'.oxmanufacturerid != ' . $oDb->quote($sSynchManufacturerId);
68 $sQAdd .=
$myConfig->getRequestParameter(
'blVariantsSelection') ?
'' :
" and $sArtTable.oxparentid = '' ";
70 $sQAdd =
" from $sArtTable where $sArtTable.oxmanufacturerid = " . $oDb->quote($sManufacturerId);
71 $sQAdd .=
$myConfig->getRequestParameter(
'blVariantsSelection') ?
'' :
" and $sArtTable.oxparentid = '' ";
90 $sQ .= $this->
getConfig()->getRequestParameter(
'blVariantsSelection') ?
' group by ' . $sArtTable .
'.oxid ' :
'';
102 $sOxid =
$myConfig->getRequestParameter(
'oxid');
104 if ($this->
getConfig()->getRequestParameter(
"all")) {
109 if (is_array($aRemoveArt) && !empty($aRemoveArt)) {
110 $sSelect =
"update oxarticles set oxmanufacturerid = null where oxid in ( " . implode(
", ",
oxDb::getInstance()->quoteArray($aRemoveArt)) .
") ";
125 $sSynchOxid =
$myConfig->getRequestParameter(
'synchoxid');
127 if (
$myConfig->getRequestParameter(
'all')) {
132 if ($sSynchOxid && $sSynchOxid !=
"-1" && is_array($aAddArticle)) {
134 $sSelect =
"update oxarticles set oxmanufacturerid = " . $oDb->quote($sSynchOxid) .
" where oxid in ( " . implode(
", ",
oxDb::getInstance()->quoteArray($aAddArticle)) .
" )";
136 $oDb->Execute($sSelect);
137 $this->
resetCounter(
"manufacturerArticle", $sSynchOxid);