15 array(
'oxtitle',
'oxcountry', 1, 1, 0),
16 array(
'oxisoalpha2',
'oxcountry', 1, 0, 0),
17 array(
'oxisoalpha3',
'oxcountry', 0, 0, 0),
18 array(
'oxunnum3',
'oxcountry', 0, 0, 0),
19 array(
'oxid',
'oxcountry', 0, 0, 1)
21 'container2' => array(
22 array(
'oxtitle',
'oxcountry', 1, 1, 0),
23 array(
'oxisoalpha2',
'oxcountry', 1, 0, 0),
24 array(
'oxisoalpha3',
'oxcountry', 0, 0, 0),
25 array(
'oxunnum3',
'oxcountry', 0, 0, 0),
26 array(
'oxid',
'oxobject2payment', 0, 0, 1)
40 $sCountryId = $this->
getConfig()->getRequestParameter(
'oxid');
41 $sSynchCountryId = $this->
getConfig()->getRequestParameter(
'synchoxid');
46 $sQAdd =
" from $sCountryTable where $sCountryTable.oxactive = '1' ";
49 $sQAdd =
" from oxobject2payment left join $sCountryTable on $sCountryTable.oxid=oxobject2payment.oxobjectid ";
50 $sQAdd .=
"where $sCountryTable.oxactive = '1' and oxobject2payment.oxpaymentid = " . $oDb->quote($sCountryId) .
" and oxobject2payment.oxtype = 'oxcountry' ";
53 if ($sSynchCountryId && $sSynchCountryId != $sCountryId) {
54 $sQAdd .=
"and $sCountryTable.oxid not in ( ";
55 $sQAdd .=
"select $sCountryTable.oxid from oxobject2payment left join $sCountryTable on $sCountryTable.oxid=oxobject2payment.oxobjectid ";
56 $sQAdd .=
"where oxobject2payment.oxpaymentid = " . $oDb->quote($sSynchCountryId) .
" and oxobject2payment.oxtype = 'oxcountry' ) ";
68 $soxId = $this->
getConfig()->getRequestParameter(
'synchoxid');
70 if ($this->
getConfig()->getRequestParameter(
'all')) {
74 if ($soxId && $soxId !=
"-1" && is_array($aChosenCntr)) {
75 foreach ($aChosenCntr as $sChosenCntr) {
76 $oObject2Payment =
oxNew(
'oxbase');
77 $oObject2Payment->init(
'oxobject2payment');
78 $oObject2Payment->oxobject2payment__oxpaymentid =
new oxField($soxId);
79 $oObject2Payment->oxobject2payment__oxobjectid =
new oxField($sChosenCntr);
80 $oObject2Payment->oxobject2payment__oxtype =
new oxField(
"oxcountry");
81 $oObject2Payment->save();
92 if ($this->
getConfig()->getRequestParameter(
'all')) {
97 } elseif (is_array($aChosenCntr)) {
98 $sQ =
"delete from oxobject2payment where oxobject2payment.oxid in (" . implode(
", ",
oxDb::getInstance()->quoteArray($aChosenCntr)) .
") ";