14 array(
'oxtitle',
'oxcategories', 1, 1, 0 ),
15 array(
'oxdesc',
'oxcategories', 1, 1, 0 ),
16 array(
'oxid',
'oxcategories', 0, 0, 0 ),
17 array(
'oxid',
'oxcategories', 0, 0, 1 )
19 'container2' => array(
20 array(
'oxtitle',
'oxcategories', 1, 1, 0 ),
21 array(
'oxdesc',
'oxcategories', 1, 1, 0 ),
22 array(
'oxid',
'oxcategories', 0, 0, 0 ),
23 array(
'oxid',
'oxcategory2attribute', 0, 0, 1 ),
24 array(
'oxid',
'oxcategories', 0, 0, 1 )
26 'container3' => array(
27 array(
'oxtitle',
'oxattribute', 1, 1, 0 ),
28 array(
'oxsort',
'oxcategory2attribute', 1, 0, 0 ),
29 array(
'oxid',
'oxcategory2attribute', 0, 0, 1 )
49 $sQAdd =
" from $sCatTable where $sCatTable.oxshopid = '".$myConfig->getShopId().
"' ";
50 $sQAdd .=
" and $sCatTable.oxactive = '1' ";
52 $sQAdd =
" from $sCatTable left join oxcategory2attribute on $sCatTable.oxid=oxcategory2attribute.oxobjectid ";
53 $sQAdd .=
" where oxcategory2attribute.oxattrid = " . $oDb->quote( $sDiscountId ) .
" and $sCatTable.oxshopid = '".$myConfig->getShopId().
"' ";
54 $sQAdd .=
" and $sCatTable.oxactive = '1' ";
57 if ( $sSynchDiscountId && $sSynchDiscountId != $sDiscountId) {
58 $sQAdd .=
" and $sCatTable.oxid not in ( select $sCatTable.oxid from $sCatTable left join oxcategory2attribute on $sCatTable.oxid=oxcategory2attribute.oxobjectid ";
59 $sQAdd .=
" where oxcategory2attribute.oxattrid = " . $oDb->quote( $sSynchDiscountId ) .
" and $sCatTable.oxshopid = '".$myConfig->getShopId().
"' ";
60 $sQAdd .=
" and $sCatTable.oxactive = '1' ) ";
73 $aChosenCat = $this->
_getActionIds(
'oxcategory2attribute.oxid' );
80 } elseif ( is_array( $aChosenCat ) ) {
81 $sQ =
"delete from oxcategory2attribute where oxcategory2attribute.oxid in (" . implode(
", ",
oxDb::getInstance()->quoteArray( $aChosenCat ) ) .
") ";
101 $oAttribute =
oxNew(
"oxattribute" );
108 if ( $oAttribute->load( $soxId ) && is_array( $aAddCategory ) ) {
110 foreach ($aAddCategory as $sAdd) {
111 $oNewGroup =
oxNew(
"oxbase" );
112 $oNewGroup->init(
"oxcategory2attribute" );
113 $oNewGroup->oxcategory2attribute__oxobjectid =
new oxField($sAdd);
114 $oNewGroup->oxcategory2attribute__oxattrid =
new oxField($oAttribute->oxattribute__oxid->value);
115 $oNewGroup->oxcategory2attribute__oxsort =
new oxField( (
int ) $oDb->getOne(
"select max(oxsort) + 1 from oxcategory2attribute where oxobjectid = '$sAdd' ",
false,
false ) );