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)
30 'container2' => array(
31 array(
'oxartnum',
'oxarticles', 1, 0, 0),
32 array(
'oxtitle',
'oxarticles', 1, 1, 0),
33 array(
'oxean',
'oxarticles', 1, 0, 0),
34 array(
'oxmpn',
'oxarticles', 0, 0, 0),
35 array(
'oxprice',
'oxarticles', 0, 0, 0),
36 array(
'oxstock',
'oxarticles', 0, 0, 0),
37 array(
'oxid',
'oxobject2attribute', 0, 0, 1)
61 $sQAdd =
" from $sArticleTable where 1 ";
62 $sQAdd .=
$myConfig->getConfigParam(
'blVariantsSelection') ?
'' :
" and $sArticleTable.oxparentid = '' ";
63 } elseif ($sSynchDelId && $sDelId != $sSynchDelId) {
65 $blVariantsSelectionParameter =
$myConfig->getConfigParam(
'blVariantsSelection');
66 $sSqlIfTrue =
" ( {$sArticleTable}.oxid=oxobject2category.oxobjectid " .
67 "or {$sArticleTable}.oxparentid=oxobject2category.oxobjectid)";
68 $sSqlIfFalse =
" {$sArticleTable}.oxid=oxobject2category.oxobjectid ";
69 $sVariantSelectionSql = $blVariantsSelectionParameter ? $sSqlIfTrue : $sSqlIfFalse;
70 $sQAdd =
" from {$sOCatView} as oxobject2category left join {$sArticleTable} on {$sVariantSelectionSql}" .
71 " where oxobject2category.oxcatnid = " . $oDb->quote($sDelId) .
" ";
73 $sQAdd =
" from {$sOAttrView} left join {$sArticleTable} " .
74 "on {$sArticleTable}.oxid={$sOAttrView}.oxobjectid " .
75 "where {$sOAttrView}.oxattrid = " . $oDb->quote($sDelId) .
76 " and {$sArticleTable}.oxid is not null ";
79 if ($sSynchDelId && $sSynchDelId != $sDelId) {
80 $sQAdd .=
" and {$sArticleTable}.oxid not in ( select {$sOAttrView}.oxobjectid from {$sOAttrView} " .
81 "where {$sOAttrView}.oxattrid = " . $oDb->quote($sSynchDelId) .
" ) ";
99 if ($this->
getConfig()->getConfigParam(
'blVariantsSelection')) {
100 $sQ .=
' group by ' . $this->
_getViewName(
'oxarticles') .
'.oxid ';
103 if ($oStr->strpos($sQ,
"select count( * ) ") === 0) {
104 $sQ =
"select count( * ) from ( {$sQ} ) as _cnttable";
116 $aChosenCat = $this->
_getActionIds(
'oxobject2attribute.oxid');
120 $sO2AttributeView = $this->
_getViewName(
'oxobject2attribute');
124 } elseif (is_array($aChosenCat)) {
125 $sChosenCategories = implode(
", ",
oxDb::getInstance()->quoteArray($aChosenCat));
126 $sQ =
"delete from oxobject2attribute where oxobject2attribute.oxid in (" . $sChosenCategories .
") ";
145 $oAttribute =
oxNew(
"oxattribute");
147 if ($oAttribute->load($soxId) && is_array($aAddArticle)) {
148 foreach ($aAddArticle as $sAdd) {
149 $oNewGroup =
oxNew(
"oxbase");
150 $oNewGroup->init(
"oxobject2attribute");
151 $oNewGroup->oxobject2attribute__oxobjectid =
new oxField($sAdd);
152 $oNewGroup->oxobject2attribute__oxattrid =
new oxField($oAttribute->oxattribute__oxid->value);