Version Notes
Corrige l'impossibilité de procéder à l'expédition de certaines commandes. Plus précisément, correction du message "Erreur Numéro de client enseigne invalide" qui s'avérait survenir lorsque le patronyme du destinataire était "trop" long (Merci à Julien - heureusement qui y'en a qui suivent ^^ - et, surtout, à Mondial Relay pour sa documentation technique très fiable et, de manière générale, pour leur collaboration de tous les instants)
Corrige l'impossibilité de sélectionner les points relais (oui, c'est fâcheux) dans le cas où Mondial Relay est la seule méthode d'expédition est paramétrée.
Download this release
Release Info
| Developer | Emmanuel Catrysse |
| Extension | man4x_mondialrelay |
| Version | 1.4.5 |
| Comparing to | |
| See all releases | |
Code changes from version 1.4.4 to 1.4.5
- app/code/community/Man4x/MondialRelay/Model/Carrier/Abstract.php +1 -1
- app/code/community/Man4x/MondialRelay/etc/config.xml +1 -1
- app/design/frontend/base/default/template/Man4x_MondialRelay/paypalexpress/shippingmethods.phtml +67 -0
- app/design/frontend/base/default/template/Man4x_MondialRelay/shippingmethods.phtml +4 -2
- package.xml +6 -9
app/code/community/Man4x/MondialRelay/Model/Carrier/Abstract.php
CHANGED
|
@@ -566,7 +566,7 @@ class Man4x_MondialRelay_Model_Carrier_Abstract extends Mage_Shipping_Model_Carr
|
|
| 566 |
'ModeCol' => $this->_getGenericConfigData('collection_mode', $_store), // Collection mode
|
| 567 |
'ModeLiv' => $_shippingMethod[1], // 24R, LCD...
|
| 568 |
'NDossier' => $order->getIncrementId(),
|
| 569 |
-
'NClient' => substr($_helper->removeAccent(preg_replace("/[^A-Za-z]/", "", $order->getBillingAddress()->getLastname())), 0,
|
| 570 |
// 'Expe_Langage' => strtoupper(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2)), // Backend language
|
| 571 |
'Expe_Langage' => 'FR',
|
| 572 |
'Expe_Ad1' => $_helper->removeAccent($_senderAddress[0]), // Sender address
|
| 566 |
'ModeCol' => $this->_getGenericConfigData('collection_mode', $_store), // Collection mode
|
| 567 |
'ModeLiv' => $_shippingMethod[1], // 24R, LCD...
|
| 568 |
'NDossier' => $order->getIncrementId(),
|
| 569 |
+
'NClient' => substr($_helper->removeAccent(preg_replace("/[^A-Za-z]/", "", $order->getBillingAddress()->getLastname())), 0, 8),
|
| 570 |
// 'Expe_Langage' => strtoupper(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2)), // Backend language
|
| 571 |
'Expe_Langage' => 'FR',
|
| 572 |
'Expe_Ad1' => $_helper->removeAccent($_senderAddress[0]), // Sender address
|
app/code/community/Man4x/MondialRelay/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Man4x_MondialRelay>
|
| 5 |
-
<version>1.4.
|
| 6 |
<depends>
|
| 7 |
<Mage_Adminhtml />
|
| 8 |
<Mage_Shipping />
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Man4x_MondialRelay>
|
| 5 |
+
<version>1.4.5</version>
|
| 6 |
<depends>
|
| 7 |
<Mage_Adminhtml />
|
| 8 |
<Mage_Shipping />
|
app/design/frontend/base/default/template/Man4x_MondialRelay/paypalexpress/shippingmethods.phtml
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Copyright (c) 2013 Man4x
|
| 4 |
+
*
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
| 6 |
+
* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
| 7 |
+
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
| 8 |
+
*
|
| 9 |
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 10 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 11 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 12 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
| 13 |
+
* IN THE SOFTWARE.
|
| 14 |
+
*
|
| 15 |
+
* @project Magento Man4x Mondial Relay Module
|
| 16 |
+
* @desc Template for dealing Mondial Relay shipping methods with Paypal Express Checkout
|
| 17 |
+
* (pick-up selection and pick-up info)
|
| 18 |
+
* Added through handle <checkout_onepage_shippingmethod>
|
| 19 |
+
* @block Man4x_MondialRelay_Block_Info
|
| 20 |
+
* @author Emmanuel Catrysse (man4x[@]hotmail[.]fr)
|
| 21 |
+
* @license http://www.opensource.org/licenses/MIT The MIT License (MIT)
|
| 22 |
+
*/
|
| 23 |
+
?>
|
| 24 |
+
|
| 25 |
+
<script type="text/javascript">
|
| 26 |
+
//<![CDATA[
|
| 27 |
+
$('shipping_method').options.each(
|
| 28 |
+
function(e, i) {
|
| 29 |
+
if (e.value == 'mondialrelaypickup_24R') {
|
| 30 |
+
e.text = "<?php echo (Mage::helper('mondialrelay')->__('Click to select your pick-up location')); ?>";
|
| 31 |
+
throw $break;
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
);
|
| 35 |
+
|
| 36 |
+
function anchorToSelectedPickup(e) {
|
| 37 |
+
// return element where to insert selected pickup div
|
| 38 |
+
return $(e.parentNode);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
Event.observe($('shipping_method'), 'change', function()
|
| 42 |
+
{
|
| 43 |
+
if (this.getValue() == 'mondialrelaypickup_24R') {
|
| 44 |
+
if ($('pickup-selected')) {$('pickup-selected').show();
|
| 45 |
+
if ($('pickup_popup')) {$('pickup_popup').show();}
|
| 46 |
+
else {
|
| 47 |
+
$(document.body).insert({bottom: '<div id="pickup_popup"></div>'});
|
| 48 |
+
new Ajax.Request('<?php echo $this->getPickupPopupUrl(); ?>', {
|
| 49 |
+
evalScripts: true,
|
| 50 |
+
onCreate: function() {$('pickup-please-wait').show();},
|
| 51 |
+
onSuccess: function(transport) {
|
| 52 |
+
$('pickup-please-wait').hide();
|
| 53 |
+
$('pickup_popup').update();
|
| 54 |
+
$('pickup_popup').update(transport.responseText);
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
);
|
| 58 |
+
_parent = anchorToSelectedPickup();
|
| 59 |
+
var _divWait = new Element('div', {id: 'pickup-please-wait', style: 'display:none;'}).update("<img src='<?php echo $this->getSkinUrl('images/Man4x_MondialRelay/mondialrelay_ajax_loading_50x55.gif')?>' />");
|
| 60 |
+
_parent.insert(_divWait);
|
| 61 |
+
var _div = new Element('div', {id: 'pickup-selected', style: 'display:none;'}).update("<p class='message'><?php echo (Mage::helper('mondialrelay')->__('Selected pick-up:'))?></p><div id='pickup-address'></p>");
|
| 62 |
+
_parent.insert(_div);
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
});
|
| 66 |
+
//]]>
|
| 67 |
+
</script>
|
app/design/frontend/base/default/template/Man4x_MondialRelay/shippingmethods.phtml
CHANGED
|
@@ -25,11 +25,13 @@
|
|
| 25 |
//<