Merge branch 'fix-mondialRealy' into develop

This commit is contained in:
Marion Muszynski 2017-07-20 16:53:01 +02:00
commit 3042613293
10 changed files with 287 additions and 82 deletions

View File

@ -7,8 +7,8 @@ $_MODULE['<{blockmyaccount}prestashop>blockmyaccount_0b9bc7f3bb601ef8959509352ae
$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mi cuenta';
$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_74ecd9234b2a42ca13e775193f391833'] = 'Mis pedidos';
$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_89080f0eedbd5491a93157930f1e45fc'] = 'Mi mercancía devuelta';
$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_9132bc7bac91dd4e1c453d4e96edf219'] = 'Mis vales descuento';
$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_9132bc7bac91dd4e1c453d4e96edf219'] = 'Mis devoluciones';
$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_e45be0a0d4a0b62b15694c1a631e6e62'] = 'Mis direcciones';
$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_63b1ba91576576e6cf2da6fab7617e58'] = 'Mis datos personales';
$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_95d2137c196c7f84df5753ed78f18332'] = 'Mis vales';
$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_95d2137c196c7f84df5753ed78f18332'] = 'Mis devoluciones';
$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_c87aacf5673fada1108c9f809d354311'] = 'Cerrar sesión';

View File

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

View File

@ -85,7 +85,7 @@ foreach ($iterator as $fileinfo) {
LEFT JOIN `' . _DB_PREFIX_ . 'order_state_current` osc
ON osc.`id_order` = d.`id_order`
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) {
$expedition_shipping[$row['expedition_number']] = $row['shipping_number'];
$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();
foreach($order_details as $d) {
if(!in_array($d, $products_sent)) {
@ -243,8 +260,14 @@ foreach ($iterator as $fileinfo) {
$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(
'{followup}' => str_replace('@', $shipping_number, $carrier->url),
'{followup}' => $url,
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{id_order}' => (int) $order->id,

View File

@ -217,6 +217,11 @@ $_MODULE['<{mondialrelay}prestashop>settings_d02bbc3cb147c272b0445ac5ca7d1a36']
$_MODULE['<{mondialrelay}prestashop>settings_ca57625685f058f54d82c6e05876a131'] = 'Choississez le statut pour la génération d\'étiquette.';
$_MODULE['<{mondialrelay}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder';
$_MODULE['<{mondialrelay}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
$_MODULE['<{mondialrelay}prestashop>checkout_process_e0626222614bdee31951d84c64e5e9ff'] = 'Choisir';
$_MODULE['<{mondialrelay}prestashop>checkout_process_91b442d385b54e1418d81adc34871053'] = 'Sélectionné';
$_MODULE['<{mondialrelay}prestashop>checkout_process_ef2a1f426c2c289ed5986c7636a5d696'] = 'Veuillez choisir un point relais';
$_MODULE['<{mondialrelay}prestashop>checkout_process_80a0c205cd57b22fca7f174253870300'] = 'Heures d\'ouvertures';
$_MODULE['<{mondialrelay}prestashop>checkout_process_2b56b60f878922093facd42284848a0c'] = 'Infos';
$_MODULE['<{mondialrelay}prestashop>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondialrelay ne peut récupérer les points relais du à une erreur de Prestashop';
$_MODULE['<{mondialrelay}prestashop>checkout_process_widget_ad3d06d03d94223fa652babc913de686'] = 'Valider votre Point Relais®';
$_MODULE['<{mondialrelay}prestashop>checkout_process_widget_b5cdf9b63fda35c33bb5e35cc3716b95'] = 'Point Relais® sélectionné :';

View File

@ -43,7 +43,7 @@ var PS_MRObject = (function($, undefined) {
// List the marker liable to the relay pint
var markerList = new Object();
var selected = false;
/**
@ -168,7 +168,7 @@ var PS_MRObject = (function($, undefined) {
$('#PS_MRLineOrderInformation-' + id_order).remove();
$('#successCreatingTicket_' + id_order).fadeIn('slow');
detailedExpeditionList.push({'id_order':id_order, 'expeditionNumber':json.success[id_order].expeditionNumber});
if (!$('#detailHistory_' + id_order).length)
{
$('#PS_MRHistoriqueTableList').append('\
@ -190,7 +190,7 @@ var PS_MRObject = (function($, undefined) {
}
$('#successCreatingTicket_' + id_order).fadeOut('slow');
}
$('.PS_MRSubmitButton').css('display', 'block');
}
if(detailedExpeditionList.length)
@ -256,7 +256,7 @@ var PS_MRObject = (function($, undefined) {
checkErrorGeneratedTickets(json);
detailedExpeditionList = checkSucceedGenerateTickets(json);
if (detailedExpeditionList.length)
getTickets(detailedExpeditionList);
else
@ -351,19 +351,19 @@ var PS_MRObject = (function($, undefined) {
}
});
}
function PS_MRSubmitButtonPrintSelected(format) {
var history_id_list = new Array();
var history_id_list_str = '';
var history_id_list_str = '';
$('input[name="history_id_list[]"]:checked').each(function()
{
var id_order = $.trim($(this).parent().next().html());
var expeditionNumber = $.trim($(this).parent().next().next().html());
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+';';
});
if(history_id_list.length) {
history_id_list_str = history_id_list_str.substr(0,(history_id_list_str.length-1));
$.ajax(
@ -377,17 +377,17 @@ var PS_MRObject = (function($, undefined) {
'mrtoken' : mrtoken},
dataType: 'json',
success: function(json)
{
{
var url = json.success[0];
if(format == 4 && url!=null) {
document.location.href= url.URL_PDF_A4;
}
if(format == 5 && url!=null) {
document.location.href= url.URL_PDF_A5;
}
}
if(format == '10x15' && url!=null) {
document.location.href= url.URL_PDF_10x15;
}
}
},
error: function(xhr, ajaxOptions, thrownError)
{
@ -396,7 +396,7 @@ var PS_MRObject = (function($, undefined) {
});
}
}
function strPad(input, length, string) {
string = string || '0'; input = 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
*/
function PS_MRDisplayRelayPoint(json, blockContent, carrier_id)
{
{
if (typeof json != 'undefined' && typeof blockContent != 'undefined')
{
numberDisplayed = 0;
@ -694,7 +694,7 @@ var PS_MRObject = (function($, undefined) {
PS_MROpenPopupDetail(json.success[relayPoint].permaLinkDetail);
});*/
}
}
}
PS_MRHandleSelectedRelayPoint();
$(this).fadeIn('fast');
});
@ -728,7 +728,7 @@ var PS_MRObject = (function($, undefined) {
*/
function PS_MRFetchRelayPoint(carrierSelected)
{
carrier_id = carrierSelected.val().replace(',', '');
carrier_id = carrierSelected.val().replace(',', '');
// Block is an input, we need the 'tr' element
blockTR =$('#MR_PR_list_'+carrier_id+' tr');
// 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.
// It's an hidden block which will be put in the right block when user select his
// own carrier
return;
$('body').prepend('\
<tr id="PS_MRGmapDefaultPosition_' + id_carrier + '" class="PS_MRGmapDefaultPosition">\
<td colspan="4"> \
@ -1087,25 +1088,25 @@ var PS_MRObject = (function($, undefined) {
if ($('#' + block_form_id).length == 0)
$('#MR_error_account').fadeIn('fast');
}
function checkToDisplayRelayList()
{
{
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') {
$('input[name="id_carrier"]').each(function(i, e){
var parent_element = $(e).closest('tr');
var new_element = 'MR_PR_list_'+$(e).val().replace(',', '');
var MR_idcarrier = $(e).val().replace(',', '');
MR_carrier = isMRCarrier(MR_idcarrier);
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')) {
$(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>'
+'</tr></table></div>'
+'</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'))
{
$(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>'
+'</tr></table></div>'
+'</td></tr>'
@ -1125,23 +1126,23 @@ var PS_MRObject = (function($, undefined) {
}
}
}
if($(e).attr('checked') == 'checked' || $(e).attr('checked')) {
if(MR_carrier != false) {
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;
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')
$('.trMRSelected').fadeIn('fast');
else
$('.trMRSelected').fadeOut('fast');
}
else {
PS_MRHideLastRelayPointList();
else {
PS_MRHideLastRelayPointList();
PS_MRSelectedRelayPoint['relayPointNum'] = -1;
$('.trMRSelected').fadeOut('fast');
}
@ -1172,24 +1173,24 @@ var PS_MRObject = (function($, undefined) {
+'</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(MR_carrier != false) {
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;
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')
$('.trMRSelected').fadeIn('fast');
else
$('.trMRSelected').fadeOut('fast');
}
else {
PS_MRHideLastRelayPointList();
else {
PS_MRHideLastRelayPointList();
PS_MRSelectedRelayPoint['relayPointNum'] = -1;
$('.trMRSelected').fadeOut('fast');
}
@ -1198,7 +1199,7 @@ var PS_MRObject = (function($, undefined) {
}
}
}
function isMRCarrier(id_carrier){
var carrier_list = PS_MRData.carrier_list;
for(i in carrier_list){
@ -1279,7 +1280,7 @@ var PS_MRObject = (function($, undefined) {
width = ((width - ul_width) / 2);
$('#MR_config_menu').children('ul').css('margin-left', width + 'px');
}
// 1.5 OPC Validation - Warn user to select a relay point
$('.payment_module a').live('click', function() {
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
$('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']);
if (!_return)
alert(PS_MRTranslationList['errorSelection']);
return _return;
});
if (typeof PS_MRData != 'undefined')
{
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
});
@ -1331,7 +1332,7 @@ var PS_MRObject = (function($, undefined) {
/**
* Check connexion to webservice *
* Check connexion to webservice *
*/
function mr_checkConnexion() {
var enseigne = $("#MR_enseigne_webservice").val();
@ -1355,6 +1356,6 @@ function mr_checkConnexion() {
else
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_)
return $this->fetchTemplate('/views/templates/front/', 'header_widget');

View File

@ -24,7 +24,97 @@
* 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;
text-align: justify;
font-family: sans-serif;
}
#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
var PS_MRData = {$MR_Data};
{assign var=MR_Data value=$MR_Data|json_decode:1}

View File

@ -34,7 +34,7 @@
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'}";
@ -43,12 +43,12 @@
</script>
{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>
{/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'}
<script type="text/javascript" src="{$new_base_dir|escape:'htmlall':'UTF-8'}js/mondialrelay.js"></script>
{/if}

View File

@ -23,13 +23,99 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<style>
#fancybox-content {
border: 0px;
padding: 20px 10px;
}
#fancybox-content .MR-Widget {
width: auto;
height: 500px;
margin: 0;
border: 0 !important;
background: none;
}
#fancybox-content .MRW-Title {
font-size: 1.8em;
position: absolute;
top: -4px;
left: 0;
font-family: sans-serif !important;
background: none;
text-align: left;
font-weight: normal;
padding: 0;
border: 0;
color: #777777;
}
#fancybox-content .MRW-Errors {
position: absolute;
top: 72px;
width: 888px;
font-size: 14px;
font-weight: bold;
padding: 10px;
height: 20px !important;
color: rgb(255, 51, 51);
border: 1px solid rgb(255, 204, 204);
background: rgb(255, 238, 238);
}
#fancybox-content .MR-Widget .MRW-Search {
background-position: top right;
margin: 0px 30px 0px 0px;
padding: 25px 0px 0px 0px;
text-align: left;
height: 47px;
}
#fancybox-content .MRW-Results {
padding: 0px;
height: 493px !important;
}
#fancybox-content #MRW-Map {
width: 400px !important;
height: 400px !important;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
border: 1px solid gainsboro;
}
#fancybox-content .MRW-RList {
width: 280px !important;
overflow: auto;
background: #ffffff;
border: 1px solid gainsboro;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
max-height: 400px !important;
font-family: sans-serif;
font-size: 11px;
}
#fancybox-content .MRW-RList div {
padding-left: 10px;
}
#fancybox-content .MRW-RList .PR-List-Item {
border-bottom: 1px solid gainsboro;
margin: 0;
}
#fancybox-content .MRW-RList .PR-Name {
font-weight: bold;
display: inline-block;
font-size: 13px;
}
</style>
{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>
{/if}
<!--On charge le widget mondial relay depuis leurs serveurs-->
<script type="text/javascript" src="{$new_base_dir|escape:'htmlall':'UTF-8'}js/jquery.plugin.mondialrelay.parcelshoppicker.2.0.0.js"></script>
<!--On charge le widget mondial relay depuis leurs serveurs-->
<script type="text/javascript" src="{$new_base_dir|escape:'htmlall':'UTF-8'}js/jquery.plugin.mondialrelay.parcelshoppicker.2.0.0.js"></script>
<script type="text/javascript" src="{$new_base_dir|escape:'htmlall':'UTF-8'}js/mondialrelay_widget.js"></script>
@ -42,7 +128,7 @@
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' js=1}";
PS_MRTranslationList['Selected'] = "{l s='Selected' mod='mondialrelay' js=1}";
PS_MRTranslationList['errorSelection'] = "{l s='Please choose a relay point' mod='mondialrelay' js=1}";

View File

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