22 array(
'oxartnum',
'oxarticles', 1, 0, 0),
23 array(
'oxtitle',
'oxarticles', 1, 1, 0),
24 array(
'oxean',
'oxarticles', 1, 0, 0),
25 array(
'oxmpn',
'oxarticles', 0, 0, 0),
26 array(
'oxprice',
'oxarticles', 0, 0, 0),
27 array(
'oxstock',
'oxarticles', 0, 0, 0),
28 array(
'oxid',
'oxarticles', 0, 0, 1)
49 $sQAdd =
" from $sArticleTable where 1 ";
50 $sQAdd .=
$myConfig->getConfigParam(
'blVariantsSelection') ?
'' :
" and $sArticleTable.oxparentid = '' ";
54 $blVariantsSelectionParameter =
$myConfig->getConfigParam(
'blVariantsSelection');
55 $sSqlIfTrue =
" ({$sArticleTable}.oxid=oxobject2category.oxobjectid " .
56 "or {$sArticleTable}.oxparentid=oxobject2category.oxobjectid)";
57 $sSqlIfFalse =
" {$sArticleTable}.oxid=oxobject2category.oxobjectid ";
58 $sVariantSelection = $blVariantsSelectionParameter ? $sSqlIfTrue : $sSqlIfFalse;
59 $sQAdd =
" from {$sViewName} as oxobject2category left join {$sArticleTable} on " . $sVariantSelection .
60 " where oxobject2category.oxcatnid = " . $oDb->quote($sSelId) .
" ";
64 $sQAdd .=
" and $sArticleTable.oxid IS NOT NULL ";
67 $sQAdd .=
" and $sArticleTable.oxid != " . $oDb->quote($sSynchSelId) .
" ";
85 $sQ .= $this->
getConfig()->getConfigParam(
'blVariantsSelection') ?
' group by ' . $sArtTable .
'.oxid ' :
'';
101 'delete from oxobject2action '
102 .
'where oxactionid=' . $oDb->quote($sActionId)
103 .
' and oxclass = "oxarticle"'
117 'delete from oxobject2action '
118 .
'where oxactionid=' . $oDb->quote($sActionId)
119 .
' and oxclass = "oxarticle"'
122 $oObject2Promotion =
oxNew(
"oxbase");
123 $oObject2Promotion->init(
'oxobject2action');
124 $oObject2Promotion->oxobject2action__oxactionid =
new oxField($sActionId);
125 $oObject2Promotion->oxobject2action__oxobjectid =
new oxField($sArticleId);
126 $oObject2Promotion->oxobject2action__oxclass =
new oxField(
"oxarticle");
127 $oObject2Promotion->save();