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',
'oxobject2article', 0, 0, 1 )
57 $sQAdd =
" from $sArticleTable where 1 ";
58 $sQAdd .=
$myConfig->getConfigParam(
'blVariantsSelection' )?
'':
" and $sArticleTable.oxparentid = '' ";
59 } elseif ( $sSynchSelId && $sSelId != $sSynchSelId ) {
61 $sQAdd =
" from $sO2CView as oxobject2category left join $sArticleTable on ";
62 $sQAdd .=
$myConfig->getConfigParam(
'blVariantsSelection' )?
" ($sArticleTable.oxid=oxobject2category.oxobjectid or $sArticleTable.oxparentid=oxobject2category.oxobjectid)":
" $sArticleTable.oxid=oxobject2category.oxobjectid ";
63 $sQAdd .=
" where oxobject2category.oxcatnid = " . $oDb->quote( $sSelId ) .
" ";
64 } elseif (
$myConfig->getConfigParam(
'blBidirectCross' ) ) {
65 $sQAdd =
" from oxobject2article ";
66 $sQAdd .=
" inner join $sArticleTable on ( oxobject2article.oxobjectid = $sArticleTable.oxid ";
67 $sQAdd .=
" or oxobject2article.oxarticlenid = $sArticleTable.oxid ) ";
68 $sQAdd .=
" where ( oxobject2article.oxarticlenid = " . $oDb->quote( $sSelId ) .
" or oxobject2article.oxobjectid = " . $oDb->quote( $sSelId ) .
" ) ";
69 $sQAdd .=
" and $sArticleTable.oxid != " . $oDb->quote( $sSelId ) .
" ";
71 $sQAdd =
" from oxobject2article left join $sArticleTable on oxobject2article.oxobjectid=$sArticleTable.oxid ";
72 $sQAdd .=
" where oxobject2article.oxarticlenid = " . $oDb->quote( $sSelId ) .
" ";
75 if ( $sSynchSelId && $sSynchSelId != $sSelId) {
76 if (
$myConfig->getConfigParam(
'blBidirectCross' ) ) {
77 $sSubSelect =
"select $sArticleTable.oxid from oxobject2article left join $sArticleTable on (oxobject2article.oxobjectid=$sArticleTable.oxid or oxobject2article.oxarticlenid=$sArticleTable.oxid) ";
78 $sSubSelect .=
"where (oxobject2article.oxarticlenid = " . $oDb->quote( $sSynchSelId ) .
" or oxobject2article.oxobjectid = " . $oDb->quote( $sSynchSelId ) .
" )";
80 $sSubSelect =
"select $sArticleTable.oxid from oxobject2article left join $sArticleTable on oxobject2article.oxobjectid=$sArticleTable.oxid ";
81 $sSubSelect .=
"where oxobject2article.oxarticlenid = " . $oDb->quote( $sSynchSelId ) .
" ";
84 $sSubSelect .=
" and $sArticleTable.oxid IS NOT NULL ";
85 $sQAdd .=
" and $sArticleTable.oxid not in ( $sSubSelect ) ";
89 $sQAdd .=
" and $sArticleTable.oxid IS NOT NULL ";
92 $sId = ( $sSynchSelId ) ? $sSynchSelId : $sSelId ;
93 $sQAdd .=
" and $sArticleTable.oxid != " . $oDb->quote( $sId ) .
" ";
105 $aChosenArt = $this->
_getActionIds(
'oxobject2article.oxid' );
110 } elseif ( is_array( $aChosenArt ) ) {
111 $sQ =
"delete from oxobject2article where oxobject2article.oxid in (" . implode(
", ",
oxDb::getInstance()->quoteArray( $aChosenArt ) ) .
") ";
130 $aChosenArt = $this->
_getAll( parent::_addFilter(
"select $sArtTable.oxid ".$this->
_getQuery() ) );
133 $oArticle =
oxNew(
"oxarticle" );
134 if ( $oArticle->load( $soxId) && $soxId && $soxId !=
"-1" && is_array( $aChosenArt ) ) {
135 foreach ( $aChosenArt as $sAdd ) {
136 $oNewGroup =
oxNew(
'oxbase' );
137 $oNewGroup->init(
'oxobject2article' );
138 $oNewGroup->oxobject2article__oxobjectid =
new oxField($sAdd);
139 $oNewGroup->oxobject2article__oxarticlenid =
new oxField($oArticle->oxarticles__oxid->value);
140 $oNewGroup->oxobject2article__oxsort =
new oxField(0);