21 array(
'oxartnum',
'oxarticles', 1, 0, 0 ),
22 array(
'oxtitle',
'oxarticles', 1, 1, 0 ),
23 array(
'oxean',
'oxarticles', 1, 0, 0 ),
24 array(
'oxmpn',
'oxarticles', 0, 0, 0 ),
25 array(
'oxprice',
'oxarticles', 0, 0, 0 ),
26 array(
'oxstock',
'oxarticles', 0, 0, 0 ),
27 array(
'oxid',
'oxarticles', 0, 0, 1 )
29 'container2' => array(
30 array(
'oxartnum',
'oxarticles', 1, 0, 0 ),
31 array(
'oxtitle',
'oxarticles', 1, 1, 0 ),
32 array(
'oxean',
'oxarticles', 1, 0, 0 ),
33 array(
'oxmpn',
'oxarticles', 0, 0, 0 ),
34 array(
'oxprice',
'oxarticles', 0, 0, 0 ),
35 array(
'oxstock',
'oxarticles', 0, 0, 0 ),
36 array(
'oxid',
'oxarticles', 0, 0, 1 )
54 $sManufacturerId =
$myConfig->getRequestParameter(
'oxid' );
55 $sSynchManufacturerId =
$myConfig->getRequestParameter(
'synchoxid' );
58 if ( !$sManufacturerId ) {
60 $sQAdd =
' from '.$sArtTable.
' where '.$sArtTable.
'.oxshopid="'.
$myConfig->getShopId().
'" and 1 ';
61 $sQAdd .=
$myConfig->getRequestParameter(
'blVariantsSelection' ) ?
'':
" and $sArtTable.oxparentid = '' and $sArtTable.oxmanufacturerid != ".$oDb->quote( $sSynchManufacturerId );
62 } elseif ( $sSynchManufacturerId && $sSynchManufacturerId != $sManufacturerId ) {
64 $sQAdd =
" from $sO2CView left join $sArtTable on ";
65 $sQAdd .=
$myConfig->getRequestParameter(
'blVariantsSelection' )?
" ( $sArtTable.oxid = $sO2CView.oxobjectid or $sArtTable.oxparentid = $sO2CView.oxobjectid )":
" $sArtTable.oxid = $sO2CView.oxobjectid ";
66 $sQAdd .=
'where '.$sArtTable.
'.oxshopid="'.
$myConfig->getShopId().
'" and '.$sO2CView.
'.oxcatnid = '.$oDb->quote( $sManufacturerId ).
' and '.$sArtTable.
'.oxmanufacturerid != '.$oDb->quote( $sSynchManufacturerId );
67 $sQAdd .=
$myConfig->getRequestParameter(
'blVariantsSelection' )?
'':
" and $sArtTable.oxparentid = '' ";
69 $sQAdd =
" from $sArtTable where $sArtTable.oxmanufacturerid = ".$oDb->quote( $sManufacturerId );
70 $sQAdd .=
$myConfig->getRequestParameter(
'blVariantsSelection' )?
'':
" and $sArtTable.oxparentid = '' ";
88 $sQ .= $this->
getConfig()->getRequestParameter(
'blVariantsSelection' ) ?
' group by '.$sArtTable.
'.oxid ' :
'';
101 $sOxid =
$myConfig->getRequestParameter(
'oxid' );
103 if ( $this->
getConfig()->getRequestParameter(
"all" ) ) {
108 if ( is_array( $aRemoveArt ) && !empty( $aRemoveArt ) ) {
109 $sSelect =
"update oxarticles set oxmanufacturerid = null where oxid in ( ".implode(
", ",
oxDb::getInstance()->quoteArray( $aRemoveArt ) ).
") ";
126 $sSynchOxid =
$myConfig->getRequestParameter(
'synchoxid' );
128 if (
$myConfig->getRequestParameter(
'all' ) ) {
133 if ( $sSynchOxid && $sSynchOxid !=
"-1" && is_array( $aAddArticle ) ) {
135 $sSelect =
"update oxarticles set oxmanufacturerid = ".$oDb->quote( $sSynchOxid ).
" where oxid in ( ".implode(
", ",
oxDb::getInstance()->quoteArray( $aAddArticle ) ).
" )";
137 $oDb->Execute( $sSelect);
138 $this->
resetCounter(
"manufacturerArticle", $sSynchOxid );