25 $iLang = $oLang->getTplLanguage();
28 unset($this->_aViewData[
"sumtype"][2]);
32 $oType =
new stdClass();
34 $oType->sDesc = $oLang->translateString(
"amount", $iLang);
35 $aDelTypes[
'a'] = $oType;
36 $oType =
new stdClass();
38 $oType->sDesc = $oLang->translateString(
"size", $iLang);
39 $aDelTypes[
's'] = $oType;
40 $oType =
new stdClass();
42 $oType->sDesc = $oLang->translateString(
"weight", $iLang);
43 $aDelTypes[
'w'] = $oType;
44 $oType =
new stdClass();
46 $oType->sDesc = $oLang->translateString(
"price", $iLang);
47 $aDelTypes[
'p'] = $oType;
50 if ($soxId !=
"-1" && isset($soxId)) {
52 $oDelivery =
oxNew(
"oxdelivery");
53 $oDelivery->loadInLang($this->_iEditLang, $soxId);
55 $oOtherLang = $oDelivery->getAvailableInLangs();
56 if (!isset($oOtherLang[$this->_iEditLang])) {
58 $oDelivery->loadInLang(key($oOtherLang), $soxId);
61 $this->_aViewData[
"edit"] = $oDelivery;
65 $aLang = array_diff($oLang->getLanguageNames(), $oOtherLang);
67 $this->_aViewData[
"posslang"] =
$aLang;
70 foreach ($oOtherLang as $id => $language) {
71 $oLang =
new stdClass();
72 $oLang->sLangDesc = $language;
74 $this->_aViewData[
"otherlang"][$id] = clone $oLang;
78 if (!$oDelivery->oxdelivery__oxdeltype->value) {
79 $oDelivery->oxdelivery__oxdeltype =
new oxField(
"a");
81 $aDelTypes[$oDelivery->oxdelivery__oxdeltype->value]->selected =
true;
84 $this->_aViewData[
"deltypes"] = $aDelTypes;
87 $oDeliveryMainAjax =
oxNew(
'delivery_main_ajax');
88 $this->_aViewData[
'oxajax'] = $oDeliveryMainAjax->getColumns();
90 return "popups/delivery_main.tpl";
93 return "delivery_main.tpl";
110 $aParams[
'oxdelivery__oxshopid'] = $sShopID;
112 $oDelivery =
oxNew(
"oxdelivery");
114 if ($soxId !=
"-1") {
115 $oDelivery->loadInLang($this->_iEditLang, $soxId);
117 $aParams[
'oxdelivery__oxid'] = null;
121 if (!isset($aParams[
'oxdelivery__oxactive'])) {
122 $aParams[
'oxdelivery__oxactive'] = 0;
125 if (!isset($aParams[
'oxdelivery__oxfixed'])) {
126 $aParams[
'oxdelivery__oxfixed'] = 0;
129 if (!isset($aParams[
'oxdelivery__oxfinalize'])) {
130 $aParams[
'oxdelivery__oxfinalize'] = 0;
133 if (!isset($aParams[
'oxdelivery__oxsort'])) {
134 $aParams[
'oxdelivery__oxsort'] = 9999;
138 $oDelivery->setLanguage(0);
139 $oDelivery->assign($aParams);
140 $oDelivery->setLanguage($this->_iEditLang);
160 $aParams[
'oxdelivery__oxshopid'] = $sShopID;
162 $oDelivery =
oxNew(
"oxdelivery");
164 if ($soxId !=
"-1") {
165 $oDelivery->loadInLang($this->_iEditLang, $soxId);
167 $aParams[
'oxdelivery__oxid'] = null;
171 if (!isset($aParams[
'oxdelivery__oxactive'])) {
172 $aParams[
'oxdelivery__oxactive'] = 0;
174 if (!isset($aParams[
'oxdelivery__oxfixed'])) {
175 $aParams[
'oxdelivery__oxfixed'] = 0;
179 $oDelivery->setLanguage(0);
180 $oDelivery->assign($aParams);
181 $oDelivery->setLanguage($this->_iEditLang);