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',
'oxaccessoire2article', 0, 0, 1 )
57 $sQAdd =
" from $sArticleTable where 1 ";
58 $sQAdd .=
$myConfig->getConfigParam(
'blVariantsSelection' )?
'':
" and $sArticleTable.oxparentid = '' ";
61 if ( $sSynchSelId && $sSelId != $sSynchSelId ) {
62 $sQAdd =
" from $sO2CView left join $sArticleTable on ";
63 $sQAdd .=
$myConfig->getConfigParam(
'blVariantsSelection' )?
" ( $sArticleTable.oxid=$sO2CView.oxobjectid or $sArticleTable.oxparentid=$sO2CView.oxobjectid )":
" $sArticleTable.oxid=$sO2CView.oxobjectid ";
64 $sQAdd .=
" where $sO2CView.oxcatnid = " . $oDb->quote( $sSelId ) .
" ";
66 $sQAdd =
" from oxaccessoire2article left join $sArticleTable on oxaccessoire2article.oxobjectid=$sArticleTable.oxid ";
67 $sQAdd .=
" where oxaccessoire2article.oxarticlenid = " . $oDb->quote( $sSelId ) .
" ";
71 if ( $sSynchSelId && $sSynchSelId != $sSelId ) {
73 $sSubSelect .=
" select oxaccessoire2article.oxobjectid from oxaccessoire2article ";
74 $sSubSelect .=
" where oxaccessoire2article.oxarticlenid = " . $oDb->quote( $sSynchSelId ) .
" ";
75 $sQAdd .=
" and $sArticleTable.oxid not in ( $sSubSelect ) ";
79 $sId = ( $sSynchSelId ) ? $sSynchSelId : $sSelId ;
80 $sQAdd .=
" and $sArticleTable.oxid != " . $oDb->quote( $sId ) .
" ";
93 $aChosenArt = $this->
_getActionIds(
'oxaccessoire2article.oxid' );
100 } elseif ( is_array( $aChosenArt ) ) {
101 $sQ =
"delete from oxaccessoire2article where oxaccessoire2article.oxid in (" . implode(
", ",
oxDb::getInstance()->quoteArray( $aChosenArt ) ) .
") ";
115 $oArticle =
oxNew(
"oxarticle" );
122 $aChosenArt = $this->
_getAll( parent::_addFilter(
"select $sArtTable.oxid ".$this->
_getQuery() ) );
125 if ( $oArticle->load( $soxId ) && $soxId && $soxId !=
"-1" && is_array( $aChosenArt ) ) {
126 foreach ( $aChosenArt as $sChosenArt ) {
127 $oNewGroup =
oxNew(
"oxbase" );
128 $oNewGroup->init(
"oxaccessoire2article" );
129 $oNewGroup->oxaccessoire2article__oxobjectid =
new oxField($sChosenArt);
130 $oNewGroup->oxaccessoire2article__oxarticlenid =
new oxField($oArticle->oxarticles__oxid->value);
131 $oNewGroup->oxaccessoire2article__oxsort =
new oxField(0);