comment paid option for mondial relay return to be enabled later

This commit is contained in:
Marion Muszynski 2017-02-27 10:31:48 +01:00
parent e3da63737c
commit a099f27ab0

View File

@ -234,12 +234,13 @@ class AdminOrders extends AdminTab
$pcode = '11';
$chars = array('I', 'O', 'P', 'S', 'T', );
$return_link = 'http://devoluciones.puntopack.es/d/F1BEBEBO/?SiteId=F1BEBEBO&Country=ES&Language=es';
} else {
// Paid
$pcode = '08';
$chars = array('A', 'E', 'K', 'R', 'Z', );
$return_link = 'http://devoluciones.puntopack.es/d/F1BEBEBO/?SiteId=F1BEBEBO4&Country=ES&Language=es';
}
// else {
// // Paid
// $pcode = '08';
// $chars = array('A', 'E', 'K', 'R', 'Z', );
// $return_link = 'http://devoluciones.puntopack.es/d/F1BEBEBO/?SiteId=F1BEBEBO4&Country=ES&Language=es';
// }
} else {
if((int) $address_delivery['id_country'] == 3) {
// Belgium
@ -248,12 +249,13 @@ class AdminOrders extends AdminTab
$pcode = '36';
$chars = array('K', 'P', 'T', 'S', 'W', 'Z', );
$return_link = 'http://retours.mondialrelay.com/d/F1BEBEBO/?SiteId=F1BEBEBO&Country=BE&Language=fr';
} else {
// Paid
$pcode = '24';
$chars = array('C', 'J', 'L', 'M', 'N', 'R', );
$return_link = 'http://retours.mondialrelay.com/d/F1BEBEBO/?SiteId=F1BEBEBO5&Country=BE&Language=fr';
}
// else {
// // Paid
// $pcode = '24';
// $chars = array('C', 'J', 'L', 'M', 'N', 'R', );
// $return_link = 'http://retours.mondialrelay.com/d/F1BEBEBO/?SiteId=F1BEBEBO5&Country=BE&Language=fr';
// }
} elseif((int) $address_delivery['id_country'] == 6) {
// Spain
if((int) Tools::getValue('return_option') == 2) {
@ -261,12 +263,13 @@ class AdminOrders extends AdminTab
$pcode = '11';
$chars = array('I', 'O', 'P', 'S', 'T', );
$return_link = 'http://devoluciones.puntopack.es/d/F1BEBEBO/?SiteId=F1BEBEBO&Country=ES&Language=fr';
} else {
// Paid
$pcode = '08';
$chars = array('A', 'E', 'K', 'R', 'Z', );
$return_link = 'http://devoluciones.puntopack.es/d/F1BEBEBO/?SiteId=F1BEBEBO4&Country=ES&Language=fr';
}
// else {
// // Paid
// $pcode = '08';
// $chars = array('A', 'E', 'K', 'R', 'Z', );
// $return_link = 'http://devoluciones.puntopack.es/d/F1BEBEBO/?SiteId=F1BEBEBO4&Country=ES&Language=fr';
// }
} elseif((int) $address_delivery['id_country'] == 8) {
// France
if((int) Tools::getValue('return_option') == 2) {
@ -274,26 +277,28 @@ class AdminOrders extends AdminTab
$pcode = '05';
$chars = array('L', 'J', 'R', 'N', 'W', );
$return_link = 'http://retours.mondialrelay.com/d/F1BEBEBO/?SiteId=F1BEBEBO&Country=FR&Language=fr';
} else {
// Paid
$pcode = '01';
$chars = array('B', 'C', 'D', 'G', 'V', );
$return_link = 'http://retours.mondialrelay.com/d/F1BEBEBO/?SiteId=F1BEBEBO6&Country=FR&Language=fr';
}
} elseif((int) $address_delivery['id_country'] == 12) {
// Luxemburg
if((int) Tools::getValue('return_option') == 2) {
// Free
$pcode = '05';
$chars = array('L', 'J', 'R', 'N', 'W', );
$return_link = 'http://retours.mondialrelay.com/d/F1BEBEBO/?SiteId=F1BEBEBO&Country=LU&Language=fr';
} else {
// Paid
$pcode = '01';
$chars = array('B', 'C', 'D', 'G', 'V', );
$return_link = 'http://retours.mondialrelay.com/d/F1BEBEBO/?SiteId=F1BEBEBO6&Country=LU&Language=fr';
}
// else {
// // Paid
// $pcode = '01';
// $chars = array('B', 'C', 'D', 'G', 'V', );
// $return_link = 'http://retours.mondialrelay.com/d/F1BEBEBO/?SiteId=F1BEBEBO6&Country=FR&Language=fr';
// }
}
// elseif((int) $address_delivery['id_country'] == 12) {
// // Luxemburg
// if((int) Tools::getValue('return_option') == 2) {
// // Free
// $pcode = '05';
// $chars = array('L', 'J', 'R', 'N', 'W', );
// $return_link = 'http://retours.mondialrelay.com/d/F1BEBEBO/?SiteId=F1BEBEBO&Country=LU&Language=fr';
// } else {
// // Paid
// $pcode = '01';
// $chars = array('B', 'C', 'D', 'G', 'V', );
// $return_link = 'http://retours.mondialrelay.com/d/F1BEBEBO/?SiteId=F1BEBEBO6&Country=LU&Language=fr';
// }
// }
}
Db::getInstance()->Execute('SET AUTOCOMMIT = 0');
Db::getInstance()->Execute('START TRANSACTION');
@ -1487,7 +1492,7 @@ class AdminOrders extends AdminTab
'.$state->name[$cookie->id_lang].'<br />'.($return_link? ' ('.$this->l('return link:').' <a href="'.$return_link['link'].'" onclick="window.open(this.href); return false;">'.$return_link['return_number'].'</a>)': '');
}
if(in_array($addressDelivery->id_country, array(3, 6, 8, 12))) {
if(in_array($addressDelivery->id_country, array(3, 6, 8))) {
$returnable = array();
foreach ($products as $k => $product) {
$product['id_sale'] = $product_psale[(int) $product['product_id']];
@ -1570,7 +1575,7 @@ class AdminOrders extends AdminTab
<p>
<label for="return_option" style="margin: 0px; padding: 0px; float: none; text-align: left; font-weight: normal;">'.$this->l('This return will be').'</label>
<select autocomplete="off" name="return_option" id="return_option">
<option value="1">'.$this->l('paid by the customer').'</option>
<!--option value="1">'.$this->l('paid by the customer').'</option-->
<option value="2">'.$this->l('free').'</option>
</select>
</p>