fix MR from prod

This commit is contained in:
root 2017-07-19 14:34:05 +02:00
parent 246121bc14
commit 1a975aea61
7 changed files with 188 additions and 76 deletions

View File

@ -54,7 +54,7 @@ function phone_format($phone, $id_country = 8){
// if (($i+1)%2==0) // if (($i+1)%2==0)
// $_phone .= ' '; // $_phone .= ' ';
// } // }
$phone = $_phone; // $phone = $_phone;
// set format // set format
$phone = $prefix . substr($phone, 1); $phone = $prefix . substr($phone, 1);
@ -112,8 +112,8 @@ $sql = '
ON d.`id_order` = o.`id_order` ON d.`id_order` = o.`id_order`
LEFT JOIN `'._DB_PREFIX_.'customer` c LEFT JOIN `'._DB_PREFIX_.'customer` c
ON c.`id_customer` = o.`id_customer` ON c.`id_customer` = o.`id_customer`
WHERE -- p.`date_add` > "'.pSQL($last_sync).'" WHERE p.`date_add` > "'.pSQL($last_sync).'"
d.`id_order_detail` IS NOT NULL AND d.`id_order_detail` IS NOT NULL
AND o.`id_order` IS NOT NULL AND o.`id_order` IS NOT NULL
GROUP BY p.`shipping_number` GROUP BY p.`shipping_number`
'; ';
@ -560,28 +560,28 @@ $mr_ftp_conf = Configuration::getMultiple(array(
'MONDIALRELAYWS_FTP_PASSWORD' 'MONDIALRELAYWS_FTP_PASSWORD'
)); ));
// $id_ftp = ftp_connect($mr_ftp_conf['MONDIALRELAYWS_FTP_HOST']); $id_ftp = ftp_connect($mr_ftp_conf['MONDIALRELAYWS_FTP_HOST']);
// if (!ftp_login($id_ftp, $mr_ftp_conf['MONDIALRELAYWS_FTP_LOGIN'], $mr_ftp_conf['MONDIALRELAYWS_FTP_PASSWORD'])) if (!ftp_login($id_ftp, $mr_ftp_conf['MONDIALRELAYWS_FTP_LOGIN'], $mr_ftp_conf['MONDIALRELAYWS_FTP_PASSWORD']))
// die('erreur lors de l\'identification FTP'.chr(10).chr(10)); die('erreur lors de l\'identification FTP'.chr(10).chr(10));
// //activation du mode passif // //activation du mode passif
// // if (!ftp_pasv($id_ftp, true)) // // if (!ftp_pasv($id_ftp, true))
// // die('erreur lors de l\'activation du mode passif'.chr(10).chr(10)); // // die('erreur lors de l\'activation du mode passif'.chr(10).chr(10));
// $repo_dpc = dirname(__FILE__) . '/dpc/'; $repo_dpc = dirname(__FILE__) . '/dpc/';
// $mr_repo_in = 'versmrelay/'; $mr_repo_in = 'versmrelay/';
// //envoie du fichier //envoie du fichier
// $list = scandir($repo_dpc); $list = scandir($repo_dpc);
// foreach($list as $file) foreach($list as $file)
// { {
// if (!preg_match('/^dpc\..+\.txt$/', $file)) if (!preg_match('/^dpc\..+\.txt$/', $file))
// continue; continue;
// if ($file == '.' || $file == '..') if ($file == '.' || $file == '..')
// continue; continue;
// if (!ftp_put ($id_ftp, $mr_repo_in . $file, $repo_dpc . $file, FTP_BINARY)) if (!ftp_put ($id_ftp, $mr_repo_in . $file, $repo_dpc . $file, FTP_BINARY))
// print('erreur lors de l\'ouverture du fichier : ' . $file . chr(10)); print('erreur lors de l\'ouverture du fichier : ' . $file . chr(10));
// else else
// unlink($repo_dpc . $file); unlink($repo_dpc . $file);
// } }
// ftp_close($id_ftp); ftp_close($id_ftp);

View File

@ -85,7 +85,7 @@ foreach ($iterator as $fileinfo) {
LEFT JOIN `' . _DB_PREFIX_ . 'order_state_current` osc LEFT JOIN `' . _DB_PREFIX_ . 'order_state_current` osc
ON osc.`id_order` = d.`id_order` ON osc.`id_order` = d.`id_order`
WHERE s.`expedition_number` IN (' . implode(', ', $expeditions) . ') WHERE s.`expedition_number` IN (' . implode(', ', $expeditions) . ')
AND osc.`id_order_state` IN (2, 3, 12, 13, 17, 25) AND osc.`id_order_state` IN (2, 3, 12, 13, 17)
') as $row) { ') as $row) {
$expedition_shipping[$row['expedition_number']] = $row['shipping_number']; $expedition_shipping[$row['expedition_number']] = $row['shipping_number'];
$expedition_orders[$row['expedition_number']] = (int) $row['id_order']; $expedition_orders[$row['expedition_number']] = (int) $row['id_order'];
@ -173,6 +173,23 @@ foreach ($iterator as $fileinfo) {
} }
} }
foreach(Db::getInstance()->ExecuteS('
SELECT d.`id_order_detail`, IF(
(d.`product_quantity` - IF(
d.`product_quantity_return` > 0, d.`product_quantity_return`, d.`product_quantity_refunded`
) - IFNULL(SUM(s.`quantity`), 0)) > 0, 1, 0
) AS `remain`
FROM `'._DB_PREFIX_.'order_detail` d
LEFT OUTER JOIN `'._DB_PREFIX_.'philea_parcel` s
ON s.`id_order_detail` = d.`id_order_detail`
WHERE d.`id_order` = '.(int) $order->id.'
GROUP BY d.`id_order_detail`
') as $quantity_remain) {
if((int) $quantity_remain['remain'] == 0) {
$products_sent[] = (int) $quantity_remain['id_order_detail'];
}
}
$remaining = array(); $remaining = array();
foreach($order_details as $d) { foreach($order_details as $d) {
if(!in_array($d, $products_sent)) { if(!in_array($d, $products_sent)) {
@ -243,8 +260,14 @@ foreach ($iterator as $fileinfo) {
$content_txt = 'Contenu du colis :'; $content_txt = 'Contenu du colis :';
} }
if((int) $order->id_lang == 3) {
$url = 'http://www.puntopack.es/seguir-mi-envio/?numeroExpedition='.$shipping_number;
} else {
$url = 'http://www.mondialrelay.fr/suivi-de-colis/?numeroExpedition='.$shipping_number;
}
$templateVars = array( $templateVars = array(
'{followup}' => str_replace('@', $shipping_number, $carrier->url), '{followup}' => $url,
'{firstname}' => $customer->firstname, '{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname, '{lastname}' => $customer->lastname,
'{id_order}' => (int) $order->id, '{id_order}' => (int) $order->id,

View File

@ -43,7 +43,7 @@ var PS_MRObject = (function($, undefined) {
// List the marker liable to the relay pint // List the marker liable to the relay pint
var markerList = new Object(); var markerList = new Object();
var selected = false; var selected = false;
/** /**
@ -168,7 +168,7 @@ var PS_MRObject = (function($, undefined) {
$('#PS_MRLineOrderInformation-' + id_order).remove(); $('#PS_MRLineOrderInformation-' + id_order).remove();
$('#successCreatingTicket_' + id_order).fadeIn('slow'); $('#successCreatingTicket_' + id_order).fadeIn('slow');
detailedExpeditionList.push({'id_order':id_order, 'expeditionNumber':json.success[id_order].expeditionNumber}); detailedExpeditionList.push({'id_order':id_order, 'expeditionNumber':json.success[id_order].expeditionNumber});
if (!$('#detailHistory_' + id_order).length) if (!$('#detailHistory_' + id_order).length)
{ {
$('#PS_MRHistoriqueTableList').append('\ $('#PS_MRHistoriqueTableList').append('\
@ -190,7 +190,7 @@ var PS_MRObject = (function($, undefined) {
} }
$('#successCreatingTicket_' + id_order).fadeOut('slow'); $('#successCreatingTicket_' + id_order).fadeOut('slow');
} }
$('.PS_MRSubmitButton').css('display', 'block'); $('.PS_MRSubmitButton').css('display', 'block');
} }
if(detailedExpeditionList.length) if(detailedExpeditionList.length)
@ -256,7 +256,7 @@ var PS_MRObject = (function($, undefined) {
checkErrorGeneratedTickets(json); checkErrorGeneratedTickets(json);
detailedExpeditionList = checkSucceedGenerateTickets(json); detailedExpeditionList = checkSucceedGenerateTickets(json);
if (detailedExpeditionList.length) if (detailedExpeditionList.length)
getTickets(detailedExpeditionList); getTickets(detailedExpeditionList);
else else
@ -351,19 +351,19 @@ var PS_MRObject = (function($, undefined) {
} }
}); });
} }
function PS_MRSubmitButtonPrintSelected(format) { function PS_MRSubmitButtonPrintSelected(format) {
var history_id_list = new Array(); var history_id_list = new Array();
var history_id_list_str = ''; var history_id_list_str = '';
$('input[name="history_id_list[]"]:checked').each(function() $('input[name="history_id_list[]"]:checked').each(function()
{ {
var id_order = $.trim($(this).parent().next().html()); var id_order = $.trim($(this).parent().next().html());
var expeditionNumber = $.trim($(this).parent().next().next().html()); var expeditionNumber = $.trim($(this).parent().next().next().html());
history_id_list.push({'id_order':id_order, 'expeditionNumber':expeditionNumber}); history_id_list.push({'id_order':id_order, 'expeditionNumber':expeditionNumber});
expeditionNumber = strPad(expeditionNumber,8,0); expeditionNumber = strPad(expeditionNumber,8,0);
history_id_list_str += expeditionNumber+';'; history_id_list_str += expeditionNumber+';';
}); });
if(history_id_list.length) { if(history_id_list.length) {
history_id_list_str = history_id_list_str.substr(0,(history_id_list_str.length-1)); history_id_list_str = history_id_list_str.substr(0,(history_id_list_str.length-1));
$.ajax( $.ajax(
@ -377,17 +377,17 @@ var PS_MRObject = (function($, undefined) {
'mrtoken' : mrtoken}, 'mrtoken' : mrtoken},
dataType: 'json', dataType: 'json',
success: function(json) success: function(json)
{ {
var url = json.success[0]; var url = json.success[0];
if(format == 4 && url!=null) { if(format == 4 && url!=null) {
document.location.href= url.URL_PDF_A4; document.location.href= url.URL_PDF_A4;
} }
if(format == 5 && url!=null) { if(format == 5 && url!=null) {
document.location.href= url.URL_PDF_A5; document.location.href= url.URL_PDF_A5;
} }
if(format == '10x15' && url!=null) { if(format == '10x15' && url!=null) {
document.location.href= url.URL_PDF_10x15; document.location.href= url.URL_PDF_10x15;
} }
}, },
error: function(xhr, ajaxOptions, thrownError) error: function(xhr, ajaxOptions, thrownError)
{ {
@ -396,7 +396,7 @@ var PS_MRObject = (function($, undefined) {
}); });
} }
} }
function strPad(input, length, string) { function strPad(input, length, string) {
string = string || '0'; input = input + ''; string = string || '0'; input = input + '';
return input.length >= length ? input : new Array(length - input.length + 1).join(string) + input; return input.length >= length ? input : new Array(length - input.length + 1).join(string) + input;
@ -649,7 +649,7 @@ var PS_MRObject = (function($, undefined) {
* @param carrier_id * @param carrier_id
*/ */
function PS_MRDisplayRelayPoint(json, blockContent, carrier_id) function PS_MRDisplayRelayPoint(json, blockContent, carrier_id)
{ {
if (typeof json != 'undefined' && typeof blockContent != 'undefined') if (typeof json != 'undefined' && typeof blockContent != 'undefined')
{ {
numberDisplayed = 0; numberDisplayed = 0;
@ -694,7 +694,7 @@ var PS_MRObject = (function($, undefined) {
PS_MROpenPopupDetail(json.success[relayPoint].permaLinkDetail); PS_MROpenPopupDetail(json.success[relayPoint].permaLinkDetail);
});*/ });*/
} }
} }
PS_MRHandleSelectedRelayPoint(); PS_MRHandleSelectedRelayPoint();
$(this).fadeIn('fast'); $(this).fadeIn('fast');
}); });
@ -728,7 +728,7 @@ var PS_MRObject = (function($, undefined) {
*/ */
function PS_MRFetchRelayPoint(carrierSelected) function PS_MRFetchRelayPoint(carrierSelected)
{ {
carrier_id = carrierSelected.val().replace(',', ''); carrier_id = carrierSelected.val().replace(',', '');
// Block is an input, we need the 'tr' element // Block is an input, we need the 'tr' element
blockTR =$('#MR_PR_list_'+carrier_id+' tr'); blockTR =$('#MR_PR_list_'+carrier_id+' tr');
// Add a new line to the table after the clicked parent element // Add a new line to the table after the clicked parent element
@ -811,6 +811,7 @@ var PS_MRObject = (function($, undefined) {
// present everytime in the page. Body is the only one sure. // present everytime in the page. Body is the only one sure.
// It's an hidden block which will be put in the right block when user select his // It's an hidden block which will be put in the right block when user select his
// own carrier // own carrier
return;
$('body').prepend('\ $('body').prepend('\
<tr id="PS_MRGmapDefaultPosition_' + id_carrier + '" class="PS_MRGmapDefaultPosition">\ <tr id="PS_MRGmapDefaultPosition_' + id_carrier + '" class="PS_MRGmapDefaultPosition">\
<td colspan="4"> \ <td colspan="4"> \
@ -1087,25 +1088,25 @@ var PS_MRObject = (function($, undefined) {
if ($('#' + block_form_id).length == 0) if ($('#' + block_form_id).length == 0)
$('#MR_error_account').fadeIn('fast'); $('#MR_error_account').fadeIn('fast');
} }
function checkToDisplayRelayList() function checkToDisplayRelayList()
{ {
if (typeof PS_MRData != 'undefined') if (typeof PS_MRData != 'undefined')
{ {
PS_MRSelectedRelayPoint['relayPointNum'] = PS_MRData.pre_selected_relay; PS_MRSelectedRelayPoint['relayPointNum'] = PS_MRData.pre_selected_relay;
if (PS_MRData.PS_VERSION < '1.5') { if (PS_MRData.PS_VERSION < '1.5') {
$('input[name="id_carrier"]').each(function(i, e){ $('input[name="id_carrier"]').each(function(i, e){
var parent_element = $(e).closest('tr'); var parent_element = $(e).closest('tr');
var new_element = 'MR_PR_list_'+$(e).val().replace(',', ''); var new_element = 'MR_PR_list_'+$(e).val().replace(',', '');
var MR_idcarrier = $(e).val().replace(',', ''); var MR_idcarrier = $(e).val().replace(',', '');
MR_carrier = isMRCarrier(MR_idcarrier); MR_carrier = isMRCarrier(MR_idcarrier);
if($('#'+new_element).length > 0) { if($('#'+new_element).length > 0) {
$('#'+new_element).remove(); $('#'+new_element).parent().parent().parent().remove();
if( isMRCarrier(MR_idcarrier)!=false && typeof(MR_carrier) != "undefined" && (MR_carrier.dlv_mode!='LD1' && MR_carrier.dlv_mode!='LDS' && MR_carrier.dlv_mode!='HOM')) { if( isMRCarrier(MR_idcarrier)!=false && typeof(MR_carrier) != "undefined" && (MR_carrier.dlv_mode!='LD1' && MR_carrier.dlv_mode!='LDS' && MR_carrier.dlv_mode!='HOM')) {
$(parent_element).after( $(parent_element).after(
'<tr><td colspan="10" style="border:0;"><div><table width="98%" id="'+new_element+'" class="trMRSelected" style="display:none;"><tr>' '<tr><td colspan="10" style="border:0;height: auto;"><div><table width="98%" id="'+new_element+'" class="trMRSelected" style="display:none;"><tr>'
+ '<td style="border:0;"></td>' + '<td style="border:0;"></td>'
+'</tr></table></div>' +'</tr></table></div>'
+'</td></tr>' +'</td></tr>'
@ -1117,7 +1118,7 @@ var PS_MRObject = (function($, undefined) {
if(typeof(MR_carrier) != "undefined" && (MR_carrier.dlv_mode!='LD1' && MR_carrier.dlv_mode!='LDS' && MR_carrier.dlv_mode!='HOM')) if(typeof(MR_carrier) != "undefined" && (MR_carrier.dlv_mode!='LD1' && MR_carrier.dlv_mode!='LDS' && MR_carrier.dlv_mode!='HOM'))
{ {
$(parent_element).after( $(parent_element).after(
'<tr><td colspan="10" style="border:0;"><div><table width="98%" id="'+new_element+'" class="trMRSelected" style="display:none;"><tr>' '<tr><td colspan="10" style="border:0;height: auto;"><div><table width="98%" id="'+new_element+'" class="trMRSelected" style="display:none;"><tr>'
+ '<td style="border:0;"></td>' + '<td style="border:0;"></td>'
+'</tr></table></div>' +'</tr></table></div>'
+'</td></tr>' +'</td></tr>'
@ -1125,23 +1126,23 @@ var PS_MRObject = (function($, undefined) {
} }
} }
} }
if($(e).attr('checked') == 'checked' || $(e).attr('checked')) { if($(e).attr('checked') == 'checked' || $(e).attr('checked')) {
if(MR_carrier != false) { if(MR_carrier != false) {
PS_MRCarrierMethodList[MR_idcarrier] = MR_carrier.id_mr_method; PS_MRCarrierMethodList[MR_idcarrier] = MR_carrier.id_mr_method;
PS_MRSelectedRelayPoint['carrier_id'] = MR_idcarrier; PS_MRSelectedRelayPoint['carrier_id'] = MR_idcarrier;
var new_element = 'MR_PR_list_'+MR_idcarrier; var new_element = 'MR_PR_list_'+MR_idcarrier;
PS_MRCarrierSelectedProcess($(this), MR_idcarrier, MR_carrier.dlv_mode); PS_MRCarrierSelectedProcess($(this), MR_idcarrier, MR_carrier.dlv_mode);
if(MR_carrier.dlv_mode!='LD1' && MR_carrier.dlv_mode!='LDS' && MR_carrier.dlv_mode!='HOM') if(MR_carrier.dlv_mode!='LD1' && MR_carrier.dlv_mode!='LDS' && MR_carrier.dlv_mode!='HOM')
$('.trMRSelected').fadeIn('fast'); $('.trMRSelected').fadeIn('fast');
else else
$('.trMRSelected').fadeOut('fast'); $('.trMRSelected').fadeOut('fast');
} }
else { else {
PS_MRHideLastRelayPointList(); PS_MRHideLastRelayPointList();
PS_MRSelectedRelayPoint['relayPointNum'] = -1; PS_MRSelectedRelayPoint['relayPointNum'] = -1;
$('.trMRSelected').fadeOut('fast'); $('.trMRSelected').fadeOut('fast');
} }
@ -1172,24 +1173,24 @@ var PS_MRObject = (function($, undefined) {
+'</tr></table></div>'); +'</tr></table></div>');
} }
} }
// Hide MR input if one of them is not selected // Hide MR input if one of them is not selected
if($(e).val() == carrier_selected) if($(e).val() == carrier_selected)
{ {
if(MR_carrier != false) { if(MR_carrier != false) {
PS_MRCarrierMethodList[MR_idcarrier] = MR_carrier.id_mr_method; PS_MRCarrierMethodList[MR_idcarrier] = MR_carrier.id_mr_method;
PS_MRSelectedRelayPoint['carrier_id'] = MR_idcarrier; PS_MRSelectedRelayPoint['carrier_id'] = MR_idcarrier;
var new_element = 'MR_PR_list_'+MR_idcarrier; var new_element = 'MR_PR_list_'+MR_idcarrier;
PS_MRCarrierSelectedProcess($(this), MR_idcarrier, MR_carrier.dlv_mode); PS_MRCarrierSelectedProcess($(this), MR_idcarrier, MR_carrier.dlv_mode);
if(MR_carrier.dlv_mode!='LD1' && MR_carrier.dlv_mode!='LDS' && MR_carrier.dlv_mode!='HOM') if(MR_carrier.dlv_mode!='LD1' && MR_carrier.dlv_mode!='LDS' && MR_carrier.dlv_mode!='HOM')
$('.trMRSelected').fadeIn('fast'); $('.trMRSelected').fadeIn('fast');
else else
$('.trMRSelected').fadeOut('fast'); $('.trMRSelected').fadeOut('fast');
} }
else { else {
PS_MRHideLastRelayPointList(); PS_MRHideLastRelayPointList();
PS_MRSelectedRelayPoint['relayPointNum'] = -1; PS_MRSelectedRelayPoint['relayPointNum'] = -1;
$('.trMRSelected').fadeOut('fast'); $('.trMRSelected').fadeOut('fast');
} }
@ -1198,7 +1199,7 @@ var PS_MRObject = (function($, undefined) {
} }
} }
} }
function isMRCarrier(id_carrier){ function isMRCarrier(id_carrier){
var carrier_list = PS_MRData.carrier_list; var carrier_list = PS_MRData.carrier_list;
for(i in carrier_list){ for(i in carrier_list){
@ -1279,7 +1280,7 @@ var PS_MRObject = (function($, undefined) {
width = ((width - ul_width) / 2); width = ((width - ul_width) / 2);
$('#MR_config_menu').children('ul').css('margin-left', width + 'px'); $('#MR_config_menu').children('ul').css('margin-left', width + 'px');
} }
// 1.5 OPC Validation - Warn user to select a relay point // 1.5 OPC Validation - Warn user to select a relay point
$('.payment_module a').live('click', function() { $('.payment_module a').live('click', function() {
if (typeof PS_MRData != 'undefined') if (typeof PS_MRData != 'undefined')
@ -1293,16 +1294,16 @@ var PS_MRObject = (function($, undefined) {
} }
} }
}); });
// If MR carrier selected, check MR relay point is selected too // If MR carrier selected, check MR relay point is selected too
$('input[name=processCarrier], button[name=processCarrier]').click(function(){ $('input[name=processCarrier], button[name=processCarrier]').click(function(){
var _return = !(PS_MRSelectedRelayPoint['carrier_id'] && !PS_MRSelectedRelayPoint['relayPointNum']); var _return = !(PS_MRSelectedRelayPoint['carrier_id'] && !PS_MRSelectedRelayPoint['relayPointNum']);
if (!_return) if (!_return)
alert(PS_MRTranslationList['errorSelection']); alert(PS_MRTranslationList['errorSelection']);
return _return; return _return;
}); });
if (typeof PS_MRData != 'undefined') if (typeof PS_MRData != 'undefined')
{ {
if (PS_MRData.PS_VERSION < '1.5') { if (PS_MRData.PS_VERSION < '1.5') {
@ -1311,7 +1312,7 @@ var PS_MRObject = (function($, undefined) {
}); });
} }
} }
// Handle input click of the other input to hide the previous relay point list displayed // Handle input click of the other input to hide the previous relay point list displayed
}); });
@ -1331,7 +1332,7 @@ var PS_MRObject = (function($, undefined) {
/** /**
* Check connexion to webservice * * Check connexion to webservice *
*/ */
function mr_checkConnexion() { function mr_checkConnexion() {
var enseigne = $("#MR_enseigne_webservice").val(); var enseigne = $("#MR_enseigne_webservice").val();
@ -1355,6 +1356,6 @@ function mr_checkConnexion() {
else else
alert("Service Indisponible"); alert("Service Indisponible");
} }
} }
}); });
} }

View File

@ -658,7 +658,7 @@ class MondialRelay extends Module
)); ));
return $this->fetchTemplate('/views/templates/front/', 'header_widget'); //return $this->fetchTemplate('/views/templates/front/', 'header_widget');
if (Configuration::get('MONDIAL_RELAY_MODE') == 'widget' && !_PS_MOBILE_) if (Configuration::get('MONDIAL_RELAY_MODE') == 'widget' && !_PS_MOBILE_)
return $this->fetchTemplate('/views/templates/front/', 'header_widget'); return $this->fetchTemplate('/views/templates/front/', 'header_widget');

View File

@ -24,7 +24,95 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<script type="text/javascript"> <style>
#carrierTable table.trMRSelected td {
background: #f1f1f1;
}
#carrierTable table.trMRSelected tr:first-child td, #carrierTable table.trMRSelected tr:first-child {
display: none !important;
}
#carrierTable table.trMRSelected .PS_MRRelayPointInfo {
margin-top: 10px;
background: #ffffff;
padding: 10px;
}
#carrierTable table.trMRSelected .PS_MRRelayPointInfo img {
max-width: 10%;
margin-right: 10%;
display: block;
float: left;
padding:0px;
height: auto;
}
#carrierTable table.trMRSelected .PS_MRRelayPointInfo p {
width: 80%;
float: left;
}
#carrierTable table.trMRSelected .PS_MRRelayPointInfo div:before {
display: table;
clear: both;
content: " ";
}
#carrierTable table.trMRSelected .PS_MRRelayPointInfo div {
text-align: center;
}
#carrierTable table.trMRSelected .PS_MRRelayPointInfo div a,
#carrierTable table.trMRSelected .PS_MRRelayPointInfo div a.PS_MRSelectRelayPointButton {
display: inline-block;
color: #ffffff;
background: #42b82f;
font-size: 14px;
padding: 10px 20px;
text-decoration: none;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
font-weight: bold;
float: none;
height: auto;
width:auto;
line-height: initial;
margin-top:0;
}
.PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected{
background: none!important;
}
</style>
<script type="text/javascript">
// Global JS Value
var _PS_MR_MODULE_DIR_ = "{$new_base_dir|escape:'htmlall':'UTF-8'}";
var mrtoken = "{$MRToken|escape:'htmlall':'UTF-8'}";
var PS_MRMODE = "{$MR_MONDIAL_RELAY_MODE|escape:'htmlall':'UTF-8'}";
var PS_MROPC = {$one_page_checkout|escape:'htmlall':'UTF-8'};
var PS_MRTranslationList = [];
var PS_MRCarrierMethodList = [];
var PS_MRSelectedRelayPoint = {literal}{{/literal}'carrier_id': 0, 'relayPointNum': 0{literal}}{/literal};
PS_MRTranslationList['Select'] = "{l s='Select' mod='mondialrelay'}";
PS_MRTranslationList['Selected'] = "{l s='Selected' mod='mondialrelay'}";
PS_MRTranslationList['errorSelection'] = "{l s='Please choose a relay point' mod='mondialrelay'}";
PS_MRTranslationList['openingRelay'] = "{l s='Opening hours' mod='mondialrelay'}";
PS_MRTranslationList['moreDetails'] = "{l s='More details' mod='mondialrelay'}";
</script>
{if isset($addJsInTemplate)}
<!--On charge Google Map API-->
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
{/if}
<!--On charge le widget mondial relay depuis leurs serveurs-->
{if isset($page_name) && $page_name != 'module-mondialrelay-selection'}
<script type="text/javascript" src="{$new_base_dir|escape:'htmlall':'UTF-8'}js/mondialrelay.js"></script>
{/if}
<script type="text/javascript" src="{$new_base_dir|escape:'htmlall':'UTF-8'}js/gmap.js"></script>
<script type="text/javascript">
// Global JS Value // Global JS Value
var PS_MRData = {$MR_Data}; var PS_MRData = {$MR_Data};
{assign var=MR_Data value=$MR_Data|json_decode:1} {assign var=MR_Data value=$MR_Data|json_decode:1}

View File

@ -34,7 +34,7 @@
var PS_MRTranslationList = []; var PS_MRTranslationList = [];
var PS_MRCarrierMethodList = []; var PS_MRCarrierMethodList = [];
var PS_MRSelectedRelayPoint = {literal}{{/literal}'carrier_id': 0, 'relayPointNum': 0{literal}}{/literal}; var PS_MRSelectedRelayPoint = {literal}{{/literal}'carrier_id': 0, 'relayPointNum': 0{literal}}{/literal};
PS_MRTranslationList['Select'] = "{l s='Select' mod='mondialrelay'}"; PS_MRTranslationList['Select'] = "{l s='Select' mod='mondialrelay'}";
PS_MRTranslationList['Selected'] = "{l s='Selected' mod='mondialrelay'}"; PS_MRTranslationList['Selected'] = "{l s='Selected' mod='mondialrelay'}";
PS_MRTranslationList['errorSelection'] = "{l s='Please choose a relay point' mod='mondialrelay'}"; PS_MRTranslationList['errorSelection'] = "{l s='Please choose a relay point' mod='mondialrelay'}";
@ -43,12 +43,12 @@
</script> </script>
{if isset($addJsInTemplate)} {if isset($addJsInTemplate)}
<!--On charge Google Map API--> <!--On charge Google Map API-->
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
{/if} {/if}
<!--On charge le widget mondial relay depuis leurs serveurs--> <!--On charge le widget mondial relay depuis leurs serveurs-->
{if isset($page_name) && $page_name != 'module-mondialrelay-selection'} {if isset($page_name) && $page_name != 'module-mondialrelay-selection'}
<script type="text/javascript" src="{$new_base_dir|escape:'htmlall':'UTF-8'}js/mondialrelay.js"></script> <script type="text/javascript" src="{$new_base_dir|escape:'htmlall':'UTF-8'}js/mondialrelay.js"></script>
{/if} {/if}

View File

@ -323,7 +323,7 @@ class AdminPrivateSalesLogistique extends AdminTab {
WHERE l.`id_lang` = '.(int) $cookie->id_lang.' WHERE l.`id_lang` = '.(int) $cookie->id_lang.'
AND c.`id_parent` = 1 AND c.`id_parent` = 1
ORDER BY c.id_category DESC ORDER BY c.id_category DESC
LIMIT 500 LIMIT 3000
'); ');
$ids = array(); $ids = array();
foreach ($categories as $key => $category) { foreach ($categories as $key => $category) {