14 array(
'oxartnum',
'oxarticles', 1, 0, 0 ),
15 array(
'oxtitle',
'oxarticles', 1, 1, 0 ),
16 array(
'oxean',
'oxarticles', 1, 0, 0 ),
17 array(
'oxmpn',
'oxarticles', 0, 0, 0 ),
18 array(
'oxprice',
'oxarticles', 0, 0, 0 ),
19 array(
'oxstock',
'oxarticles', 0, 0, 0 ),
20 array(
'oxid',
'oxarticles', 0, 0, 1 )
22 'container2' => array(
23 array(
'oxartnum',
'oxarticles', 1, 0, 0 ),
24 array(
'oxtitle',
'oxarticles', 1, 1, 0 ),
25 array(
'oxean',
'oxarticles', 1, 0, 0 ),
26 array(
'oxmpn',
'oxarticles', 0, 0, 0 ),
27 array(
'oxprice',
'oxarticles', 0, 0, 0 ),
28 array(
'oxstock',
'oxarticles', 0, 0, 0 ),
29 array(
'oxid',
'oxobject2delivery', 0, 0, 1 )
55 $sDelId = $this->
getConfig()->getRequestParameter(
'oxid' );
56 $sSynchDelId = $this->
getConfig()->getRequestParameter(
'synchoxid' );
61 $sQAdd =
" from $sArtTable where 1 ";
62 $sQAdd .=
$myConfig->getConfigParam(
'blVariantsSelection' )?
'':
"and $sArtTable.oxparentid = '' ";
65 if ( $sSynchDelId && $sDelId != $sSynchDelId ) {
66 $sQAdd =
" from $sO2CView left join $sArtTable on ";
67 $sQAdd .=
$myConfig->getConfigParam(
'blVariantsSelection' )?
" ( $sArtTable.oxid=$sO2CView.oxobjectid or $sArtTable.oxparentid=$sO2CView.oxobjectid)":
" $sArtTable.oxid=$sO2CView.oxobjectid ";
68 $sQAdd .=
"where $sO2CView.oxcatnid = ". $oDb->quote( $sDelId );
70 $sQAdd =
' from oxobject2delivery left join '.$sArtTable.
' on '.$sArtTable.
'.oxid=oxobject2delivery.oxobjectid ';
71 $sQAdd .=
'where oxobject2delivery.oxdeliveryid = '.$oDb->quote( $sDelId ).
' and oxobject2delivery.oxtype = "oxarticles" ';
75 if ( $sSynchDelId && $sSynchDelId != $sDelId) {
76 $sQAdd .=
'and '.$sArtTable.
'.oxid not in ( ';
77 $sQAdd .=
'select oxobject2delivery.oxobjectid from oxobject2delivery ';
78 $sQAdd .=
'where oxobject2delivery.oxdeliveryid = '.$oDb->quote( $sSynchDelId ).
' and oxobject2delivery.oxtype = "oxarticles" ) ';
108 $aChosenArt = $this->
_getActionIds(
'oxobject2delivery.oxid' );
110 if ( $this->
getConfig()->getRequestParameter(
'all' ) ) {
115 } elseif ( is_array( $aChosenArt ) ) {
116 $sQ =
"delete from oxobject2delivery where oxobject2delivery.oxid in (" . implode(
", ",
oxDb::getInstance()->quoteArray( $aChosenArt ) ) .
") ";
129 $soxId = $this->
getConfig()->getRequestParameter(
'synchoxid');
132 if ( $this->
getConfig()->getRequestParameter(
'all' ) ) {
137 if ( $soxId && $soxId !=
"-1" && is_array( $aChosenArt ) ) {
138 foreach ( $aChosenArt as $sChosenArt) {
139 $oObject2Delivery =
oxNew(
'oxbase' );
140 $oObject2Delivery->init(
'oxobject2delivery' );
141 $oObject2Delivery->oxobject2delivery__oxdeliveryid =
new oxField($soxId);
142 $oObject2Delivery->oxobject2delivery__oxobjectid =
new oxField($sChosenArt);
143 $oObject2Delivery->oxobject2delivery__oxtype =
new oxField(
"oxarticles");
144 $oObject2Delivery->save();