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 )
52 $sVendorId = $oConfig->getRequestParameter(
'oxid' );
53 $sSynchVendorId = $oConfig->getRequestParameter(
'synchoxid' );
57 $sQAdd =
' from '.$sArtTable.
' where '.$sArtTable.
'.oxshopid="'.$oConfig->getShopId().
'" and 1 ';
58 $sQAdd .= $oConfig->getConfigParam(
'blVariantsSelection' ) ?
'':
" and $sArtTable.oxparentid = '' and $sArtTable.oxvendorid != ".$oDb->quote( $sSynchVendorId );
61 if ( $sSynchVendorId && $sSynchVendorId != $sVendorId ) {
62 $sQAdd =
" from $sO2CView left join $sArtTable on ";
63 $sQAdd .= $oConfig->getConfigParam(
'blVariantsSelection' )?
" ( $sArtTable.oxid = $sO2CView.oxobjectid or $sArtTable.oxparentid = oxobject2category.oxobjectid )":
" $sArtTable.oxid = $sO2CView.oxobjectid ";
64 $sQAdd .=
'where '.$sArtTable.
'.oxshopid="'.$oConfig->getShopId().
'" and '.$sO2CView.
'.oxcatnid = '.$oDb->quote( $sVendorId ).
' and '.$sArtTable.
'.oxvendorid != '. $oDb->quote( $sSynchVendorId );
66 $sQAdd =
" from $sArtTable where $sArtTable.oxvendorid = ".$oDb->quote( $sVendorId );
69 $sQAdd .= $oConfig->getConfigParam(
'blVariantsSelection' )?
'':
" and $sArtTable.oxparentid = '' ";
88 $sQ .= $this->
getConfig()->getConfigParam(
'blVariantsSelection' ) ?
' group by '.$sArtTable.
'.oxid ' :
'';
102 if ( $oConfig->getRequestParameter(
'all' ) ) {
107 if ( is_array( $aRemoveArt ) ) {
108 $sSelect =
"update oxarticles set oxvendorid = null where oxid in ( ".implode(
", ",
oxDb::getInstance()->quoteArray( $aRemoveArt ) ) .
") ";
110 $this->
resetCounter(
"vendorArticle", $oConfig->getRequestParameter(
'oxid' ) );
124 $soxId = $oConfig->getRequestParameter(
'synchoxid' );
126 if ( $oConfig->getRequestParameter(
'all' ) ) {
131 if ( $soxId && $soxId !=
"-1" && is_array( $aAddArticle ) ) {
133 $sSelect =
"update oxarticles set oxvendorid = ".$oDb->quote( $soxId ).
" where oxid in ( ".implode(
", ",
oxDb::getInstance()->quoteArray( $aAddArticle ) ).
" )";
135 $oDb->Execute( $sSelect);