15         array(
'oxtitle', 
'oxcategories', 1, 1, 0),
 
   16         array(
'oxdesc', 
'oxcategories', 1, 1, 0),
 
   17         array(
'oxid', 
'oxcategories', 0, 0, 0),
 
   18         array(
'oxid', 
'oxcategories', 0, 0, 1)
 
   20                                  'container2' => array(
 
   21                                      array(
'oxtitle', 
'oxcategories', 1, 1, 0),
 
   22                                      array(
'oxdesc', 
'oxcategories', 1, 1, 0),
 
   23                                      array(
'oxid', 
'oxcategories', 0, 0, 0),
 
   24                                      array(
'oxid', 
'oxcategory2attribute', 0, 0, 1),
 
   25                                      array(
'oxid', 
'oxcategories', 0, 0, 1)
 
   27                                  'container3' => array(
 
   28                                      array(
'oxtitle', 
'oxattribute', 1, 1, 0),
 
   29                                      array(
'oxsort', 
'oxcategory2attribute', 1, 0, 0),
 
   30                                      array(
'oxid', 
'oxcategory2attribute', 0, 0, 1)
 
   50             $sQAdd = 
" from {$sCatTable} where {$sCatTable}.oxshopid = '" . 
$myConfig->getShopId() . 
"' ";
 
   51             $sQAdd .= 
" and {$sCatTable}.oxactive = '1' ";
 
   53             $sQAdd = 
" from {$sCatTable} left join oxcategory2attribute " .
 
   54                      "on {$sCatTable}.oxid=oxcategory2attribute.oxobjectid " .
 
   55                      " where oxcategory2attribute.oxattrid = " . $oDb->quote($sDiscountId) .
 
   56                      " and {$sCatTable}.oxshopid = '" . 
$myConfig->getShopId() . 
"' " .
 
   57                      " and {$sCatTable}.oxactive = '1' ";
 
   60         if ($sSynchDiscountId && $sSynchDiscountId != $sDiscountId) {
 
   61             $sQAdd .= 
" and {$sCatTable}.oxid not in ( select {$sCatTable}.oxid " .
 
   62                       "from {$sCatTable} left join oxcategory2attribute " .
 
   63                       "on {$sCatTable}.oxid=oxcategory2attribute.oxobjectid " .
 
   64                       " where oxcategory2attribute.oxattrid = " . $oDb->quote($sSynchDiscountId) .
 
   65                       " and {$sCatTable}.oxshopid = '" . 
$myConfig->getShopId() . 
"' " .
 
   66                       " and {$sCatTable}.oxactive = '1' ) ";
 
   77         $aChosenCat = $this->
_getActionIds(
'oxcategory2attribute.oxid');
 
   84         } elseif (is_array($aChosenCat)) {
 
   86             $sQ = 
"delete from oxcategory2attribute where oxcategory2attribute.oxid in (" . $sChosenCategories . 
") ";
 
  103         $oAttribute = 
oxNew(
"oxattribute");
 
  110         if ($oAttribute->load($soxId) && is_array($aAddCategory)) {
 
  112             foreach ($aAddCategory as $sAdd) {
 
  113                 $oNewGroup = 
oxNew(
"oxbase");
 
  114                 $oNewGroup->init(
"oxcategory2attribute");
 
  115                 $sOxSortField = 
'oxcategory2attribute__oxsort';
 
  116                 $sObjectIdField = 
'oxcategory2attribute__oxobjectid';
 
  117                 $sAttributeIdField = 
'oxcategory2attribute__oxattrid';
 
  118                 $sOxIdField = 
'oxattribute__oxid';
 
  119                 $oNewGroup->$sObjectIdField = 
new oxField($sAdd);
 
  120                 $oNewGroup->$sAttributeIdField = 
new oxField($oAttribute->$sOxIdField->value);
 
  121                 $sSql = 
"select max(oxsort) + 1 from oxcategory2attribute where oxobjectid = '$sAdd' ";
 
  122                 $oNewGroup->$sOxSortField = 
new oxField(( 
int ) $oDb->getOne($sSql, 
false, 
false));