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',
'oxobject2delivery', 0, 0, 1),
25 array(
'oxid',
'oxcategories', 0, 0, 1)
39 $sDelId = $this->
getConfig()->getRequestParameter(
'oxid');
40 $sSynchDelId = $this->
getConfig()->getRequestParameter(
'synchoxid');
44 $sQAdd =
" from {$sCatTable} ";
46 $sQAdd =
" from oxobject2delivery left join {$sCatTable} " .
47 "on {$sCatTable}.oxid=oxobject2delivery.oxobjectid " .
48 " where oxobject2delivery.oxdeliveryid = " . $oDb->quote($sDelId) .
49 " and oxobject2delivery.oxtype = 'oxcategories' ";
52 if ($sSynchDelId && $sSynchDelId != $sDelId) {
54 $sSubSelect =
" select {$sCatTable}.oxid from oxobject2delivery left join {$sCatTable} " .
55 "on {$sCatTable}.oxid=oxobject2delivery.oxobjectid " .
56 " where oxobject2delivery.oxdeliveryid = " . $oDb->quote($sSynchDelId) .
57 " and oxobject2delivery.oxtype = 'oxcategories' ";
58 if (stristr($sQAdd,
'where') ===
false) {
63 $sQAdd .=
" {$sCatTable}.oxid not in ( $sSubSelect ) ";
77 if ($this->
getConfig()->getRequestParameter(
'all')) {
82 } elseif (is_array($aChosenCat)) {
83 $sChosenCategoriess = implode(
", ",
oxDb::getInstance()->quoteArray($aChosenCat));
84 $sQ =
"delete from oxobject2delivery where oxobject2delivery.oxid in (" . $sChosenCategoriess .
") ";
95 $soxId = $this->
getConfig()->getRequestParameter(
'synchoxid');
98 if ($this->
getConfig()->getRequestParameter(
'all')) {
103 if (isset($soxId) && $soxId !=
"-1" && isset($aChosenCat) && $aChosenCat) {
104 foreach ($aChosenCat as $sChosenCat) {
105 $oObject2Delivery =
oxNew(
'oxbase');
106 $oObject2Delivery->init(
'oxobject2delivery');
107 $oObject2Delivery->oxobject2delivery__oxdeliveryid =
new oxField($soxId);
108 $oObject2Delivery->oxobject2delivery__oxobjectid =
new oxField($sChosenCat);
109 $oObject2Delivery->oxobject2delivery__oxtype =
new oxField(
"oxcategories");
110 $oObject2Delivery->save();