Version Notes
ajout du poids de l'emballage
Download this release
Release Info
Developer | Magento Core Team |
Extension | MondialRelay_Pointsrelais |
Version | 1.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.2.2
- app/code/community/MondialRelay/Pointsrelais/Model/Carrier/Pointsrelais.php +5 -3
- app/code/community/MondialRelay/Pointsrelais/controllers/Sales/Order/ShipmentController.php +5 -0
- app/code/community/MondialRelay/Pointsrelais/etc/config.xml +2 -1
- app/code/community/MondialRelay/Pointsrelais/etc/system.xml +12 -3
- package.xml +5 -5
app/code/community/MondialRelay/Pointsrelais/Model/Carrier/Pointsrelais.php
CHANGED
@@ -22,10 +22,12 @@ class MondialRelay_Pointsrelais_Model_Carrier_Pointsrelais extends Mage_Shipping
|
|
22 |
|
23 |
$result = Mage::getModel('shipping/rate_result');
|
24 |
|
|
|
|
|
|
|
25 |
$rates = $this->getRate($request);
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
foreach($rates as $rate)
|
30 |
{
|
31 |
if (!empty($rate) && $rate['price'] >= 0)
|
22 |
|
23 |
$result = Mage::getModel('shipping/rate_result');
|
24 |
|
25 |
+
if($this->getConfigData('package_weight')){
|
26 |
+
$request->_data['package_weight'] = $request->_data['package_weight']+($this->getConfigData('package_weight')/1000);
|
27 |
+
}
|
28 |
$rates = $this->getRate($request);
|
29 |
+
$cartTmp = $request->_data['package_value_with_discount'];
|
30 |
+
$weghtTmp = $request->_data['package_weight'];
|
|
|
31 |
foreach($rates as $rate)
|
32 |
{
|
33 |
if (!empty($rate) && $rate['price'] >= 0)
|
app/code/community/MondialRelay/Pointsrelais/controllers/Sales/Order/ShipmentController.php
CHANGED
@@ -70,6 +70,11 @@ class MondialRelay_Pointsrelais_Sales_Order_ShipmentController extends Mage_Admi
|
|
70 |
$adress[1] = '';
|
71 |
}
|
72 |
$package_weightTmp = $_order->getWeight()*1000;
|
|
|
|
|
|
|
|
|
|
|
73 |
if($package_weightTmp < 100){
|
74 |
$package_weightTmp = 100;
|
75 |
}
|
70 |
$adress[1] = '';
|
71 |
}
|
72 |
$package_weightTmp = $_order->getWeight()*1000;
|
73 |
+
|
74 |
+
if($this->getConfigData('package_weight')){
|
75 |
+
$package_weightTmp = $package_weightTmp+($this->getConfigData('package_weight'));
|
76 |
+
}
|
77 |
+
|
78 |
if($package_weightTmp < 100){
|
79 |
$package_weightTmp = 100;
|
80 |
}
|
app/code/community/MondialRelay/Pointsrelais/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<MondialRelay_Pointsrelais>
|
5 |
-
<version>1.2.
|
6 |
<depends>
|
7 |
<Mage_Adminhtml />
|
8 |
<Mage_Shipping />
|
@@ -18,6 +18,7 @@
|
|
18 |
<title>Mondial Relay - Livraison en point relais</title>
|
19 |
<specificerrmsg>L'expédition en Points Relais n'est pour le moment pas disponible. Si vous avez des questions concernant ce mode de livraison, merci de nous contacter.</specificerrmsg>
|
20 |
<handling_type>F</handling_type>
|
|
|
21 |
</pointsrelais>
|
22 |
<pointsrelaisld1>
|
23 |
<active>0</active>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<MondialRelay_Pointsrelais>
|
5 |
+
<version>1.2.2</version>
|
6 |
<depends>
|
7 |
<Mage_Adminhtml />
|
8 |
<Mage_Shipping />
|
18 |
<title>Mondial Relay - Livraison en point relais</title>
|
19 |
<specificerrmsg>L'expédition en Points Relais n'est pour le moment pas disponible. Si vous avez des questions concernant ce mode de livraison, merci de nous contacter.</specificerrmsg>
|
20 |
<handling_type>F</handling_type>
|
21 |
+
<package_weight>0</package_weight>
|
22 |
</pointsrelais>
|
23 |
<pointsrelaisld1>
|
24 |
<active>0</active>
|
app/code/community/MondialRelay/Pointsrelais/etc/system.xml
CHANGED
@@ -161,12 +161,21 @@
|
|
161 |
<show_in_website>1</show_in_website>
|
162 |
<show_in_store>1</show_in_store>
|
163 |
</handling_fee>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
<import translate="label">
|
165 |
<label>Import</label>
|
166 |
<comment>Vous permet d'importer le fichier de configuration des prix de livraison</comment>
|
167 |
<frontend_type>import</frontend_type>
|
168 |
<backend_model>adminhtml/system_config_backend_shipping_pointsrelais</backend_model>
|
169 |
-
<sort_order>
|
170 |
<show_in_default>0</show_in_default>
|
171 |
<show_in_website>1</show_in_website>
|
172 |
<show_in_store>0</show_in_store>
|
@@ -175,7 +184,7 @@
|
|
175 |
<label>Export</label>
|
176 |
<comment>Vous permet d'exporter le fichier de configuration des prix de livraison</comment>
|
177 |
<frontend_type>export_pointsrelais</frontend_type>
|
178 |
-
<sort_order>
|
179 |
<show_in_default>0</show_in_default>
|
180 |
<show_in_website>1</show_in_website>
|
181 |
<show_in_store>0</show_in_store>
|
@@ -185,7 +194,7 @@
|
|
185 |
<frontend_type>select</frontend_type>
|
186 |
<comment>Lors d'un changement de condition, enregistrez la modification, puis vérifier le fichier de configuration des prix de livraison.</comment>
|
187 |
<source_model>adminhtml/system_config_source_shipping_pointsrelais</source_model>
|
188 |
-
<sort_order>
|
189 |
<show_in_default>0</show_in_default>
|
190 |
<show_in_website>1</show_in_website>
|
191 |
<show_in_store>0</show_in_store>
|
161 |
<show_in_website>1</show_in_website>
|
162 |
<show_in_store>1</show_in_store>
|
163 |
</handling_fee>
|
164 |
+
<package_weight translate="label">
|
165 |
+
<label>Package Weight</label>
|
166 |
+
<comment>in g</comment>
|
167 |
+
<frontend_type>text</frontend_type>
|
168 |
+
<sort_order>22</sort_order>
|
169 |
+
<show_in_default>1</show_in_default>
|
170 |
+
<show_in_website>1</show_in_website>
|
171 |
+
<show_in_store>1</show_in_store>
|
172 |
+
</package_weight>
|
173 |
<import translate="label">
|
174 |
<label>Import</label>
|
175 |
<comment>Vous permet d'importer le fichier de configuration des prix de livraison</comment>
|
176 |
<frontend_type>import</frontend_type>
|
177 |
<backend_model>adminhtml/system_config_backend_shipping_pointsrelais</backend_model>
|
178 |
+
<sort_order>23</sort_order>
|
179 |
<show_in_default>0</show_in_default>
|
180 |
<show_in_website>1</show_in_website>
|
181 |
<show_in_store>0</show_in_store>
|
184 |
<label>Export</label>
|
185 |
<comment>Vous permet d'exporter le fichier de configuration des prix de livraison</comment>
|
186 |
<frontend_type>export_pointsrelais</frontend_type>
|
187 |
+
<sort_order>24</sort_order>
|
188 |
<show_in_default>0</show_in_default>
|
189 |
<show_in_website>1</show_in_website>
|
190 |
<show_in_store>0</show_in_store>
|
194 |
<frontend_type>select</frontend_type>
|
195 |
<comment>Lors d'un changement de condition, enregistrez la modification, puis vérifier le fichier de configuration des prix de livraison.</comment>
|
196 |
<source_model>adminhtml/system_config_source_shipping_pointsrelais</source_model>
|
197 |
+
<sort_order>25</sort_order>
|
198 |
<show_in_default>0</show_in_default>
|
199 |
<show_in_website>1</show_in_website>
|
200 |
<show_in_store>0</show_in_store>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MondialRelay_Pointsrelais</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Module de livraison Mondial Relay</summary>
|
10 |
<description>Module de livraison Mondial Relay</description>
|
11 |
-
<notes>ajout du
|
12 |
<authors><author><name>cyrille guillaud</name><user>auto-converted</user><email>cguillaud@cg-consulting.fr</email></author></authors>
|
13 |
-
<date>2010-
|
14 |
-
<time>
|
15 |
-
<contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="pointsrelais.css" hash="229d09977ee2eac2e72dcb89bf8eb05c"/></dir><dir name="images"><dir name="mondialrelay"><file name="img_fermer.gif" hash="5901eaf779aa6fa3eac84d1dd9520113"/><file name="img_fleche.gif" hash="908f8a69124b7b16e3ec2caefc78d948"/><file name="logo_PR_01.gif" hash="7066eb60e2645b304d1b926d0a4c31e2"/><file name="Thumbs.db" hash="51da41310be9652f9360715494dc6b03"/></dir></dir><dir name="js"><file name="pointsrelais.js" hash="8008e112e4dd2f468b5726c561a5f8b4"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="pointsrelais.xml" hash="cecd44caa45a4124f3ed64a36137fd17"/></dir><dir name="template"><dir name="pointsrelais"><file name="baseurl.phtml" hash="ddbe6d60de42248171c32ac6279ae46d"/><file name="info.phtml" hash="bd616597f35a48a71bcd7bd1e4ad6575"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="MondialRelay_Pointsrelais.csv" hash="64ed2a0c6bde5f02862e24a0697a6109"/></dir></target><target name="mageetc"><dir name="modules"><file name="MondialRelay_All.xml" hash="8257e76c52b260553f8ce663c2a8b3d1"/></dir></target><target name="magecommunity"><dir name="MondialRelay"><dir name="Pointsrelais"><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="Shipment"><file name="View.php" hash="376279b97f805cb9f4c233277aece2b4"/></dir></dir><dir name="Shipment"><file name="Grid.php" hash="5b2c413145a1d077bd7503ef8302a0a2"/></dir><file name="Impression.php" hash="0685fabf03cb81a76a643e2fbc7d90bd"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Exportpointsrelais.php" hash="770095d552bf84b666577c64ce867404"/><file name="Exportpointsrelaisld1.php" hash="04bbf4fbf5f6015c618ef6e8780a896a"/><file name="Exportpointsrelaislds.php" hash="a82da5ceaaf45eafeb71d14dd691fc4c"/></dir></dir><file name="Form.php" hash="4c0349261f32513bebafe15d0e1295ae"/></dir></dir><file name="Info.php" hash="d24bd6bcffe1eae00144d320f595d40d"/></dir><dir name="controllers"><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MondialRelay_Pointsrelais</name>
|
4 |
+
<version>1.2.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Module de livraison Mondial Relay</summary>
|
10 |
<description>Module de livraison Mondial Relay</description>
|
11 |
+
<notes>ajout du poids de l'emballage</notes>
|
12 |
<authors><author><name>cyrille guillaud</name><user>auto-converted</user><email>cguillaud@cg-consulting.fr</email></author></authors>
|
13 |
+
<date>2010-05-11</date>
|
14 |
+
<time>15:09:42</time>
|
15 |
+
<contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="pointsrelais.css" hash="229d09977ee2eac2e72dcb89bf8eb05c"/></dir><dir name="images"><dir name="mondialrelay"><file name="img_fermer.gif" hash="5901eaf779aa6fa3eac84d1dd9520113"/><file name="img_fleche.gif" hash="908f8a69124b7b16e3ec2caefc78d948"/><file name="logo_PR_01.gif" hash="7066eb60e2645b304d1b926d0a4c31e2"/><file name="Thumbs.db" hash="51da41310be9652f9360715494dc6b03"/></dir></dir><dir name="js"><file name="pointsrelais.js" hash="8008e112e4dd2f468b5726c561a5f8b4"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="pointsrelais.xml" hash="cecd44caa45a4124f3ed64a36137fd17"/></dir><dir name="template"><dir name="pointsrelais"><file name="baseurl.phtml" hash="ddbe6d60de42248171c32ac6279ae46d"/><file name="info.phtml" hash="bd616597f35a48a71bcd7bd1e4ad6575"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="MondialRelay_Pointsrelais.csv" hash="64ed2a0c6bde5f02862e24a0697a6109"/></dir></target><target name="mageetc"><dir name="modules"><file name="MondialRelay_All.xml" hash="8257e76c52b260553f8ce663c2a8b3d1"/></dir></target><target name="magecommunity"><dir name="MondialRelay"><dir name="Pointsrelais"><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="Shipment"><file name="View.php" hash="376279b97f805cb9f4c233277aece2b4"/></dir></dir><dir name="Shipment"><file name="Grid.php" hash="5b2c413145a1d077bd7503ef8302a0a2"/></dir><file name="Impression.php" hash="0685fabf03cb81a76a643e2fbc7d90bd"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Exportpointsrelais.php" hash="770095d552bf84b666577c64ce867404"/><file name="Exportpointsrelaisld1.php" hash="04bbf4fbf5f6015c618ef6e8780a896a"/><file name="Exportpointsrelaislds.php" hash="a82da5ceaaf45eafeb71d14dd691fc4c"/></dir></dir><file name="Form.php" hash="4c0349261f32513bebafe15d0e1295ae"/></dir></dir><file name="Info.php" hash="d24bd6bcffe1eae00144d320f595d40d"/></dir><dir name="controllers"><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="a81a67c3a906c2f1318ee15058c5973c"/></dir><file name="ImpressionController.php" hash="3d4201841e0dfc10f96f5f4a77d5f214"/></dir><dir name="System"><file name="ConfigController.php" hash="ee82a3a607400f7d12589532a5988315"/></dir><file name="IndexController.php" hash="0b3068c6075d1ad50f32f802a91bdf38"/></dir><dir name="etc"><file name="config.xml" hash="a19afb8251ffe749f946b8cc3395db4e"/><file name="system.xml" hash="c3abb980f56d7dcaa1d5fadce91aac6e"/></dir><dir name="Helper"><file name="Data.php" hash="e81c10d80df89ecbd51715672c710d3e"/></dir><dir name="Model"><dir name="Carrier"><file name="Pointsrelais.php" hash="fc87a4fb86b643cb7fecc269c2ece73e"/><file name="Pointsrelaisld1.php" hash="841a629922b5e61adb4bb154479d0724"/><file name="Pointsrelaislds.php" hash="f78d6390690b92c45706aaf63bc87685"/></dir><dir name="Mysql4"><dir name="Carrier"><dir name="Pointsrelais"><file name="Collection.php" hash="8c7735c2b69a53f234628b8ac0d946cd"/></dir><dir name="Pointsrelaisld1"><file name="Collection.php" hash="a844776e9aaa2b90ac2a491f2c2c3013"/></dir><dir name="Pointsrelaislds"><file name="Collection.php" hash="2d9338b9f0d9b2e4e7aa5baed24780b9"/></dir><file name="Pointsrelais.php" hash="c1d5c5f50611d060612ad557111152ce"/><file name="Pointsrelaisld1.php" hash="4db6f346ff99567b6eafdeac201c7726"/><file name="Pointsrelaislds.php" hash="64957492e8b2ce9b6e2ab0e6f5b6c7b0"/></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><file name="Pointsrelais.php" hash="39881a493e895b1921f27b3b144450ee"/><file name="Pointsrelaisld1.php" hash="0ed2ee4ee8c3c725fa5f3c1cde0c6626"/><file name="Pointsrelaislds.php" hash="b1bbea361c6aeb38528af5892237d791"/></dir></dir><dir name="Source"><dir name="Shipping"><file name="Pointsrelais.php" hash="a75b6978fea52d78b0aabce1401cf9d3"/><file name="Pointsrelaisld1.php" hash="b8e21537df53d6eaba905855d0c459f2"/><file name="Pointsrelaislds.php" hash="9af32669854321d6136f2fa368566411"/></dir></dir></dir></dir><file name="Observer.php" hash="1538e54242450741dc7a64a74174584b"/></dir><dir name="sql"><dir name="pointsrelais_setup"><file name="mysql4-install-0.1.0.php" hash="bcef01a55bfd48286a132bba6a202ac4"/><file name="mysql4-install-1.2.0.php" hash="4b752ac0e50c7046f0c95516f17d6984"/><file name="mysql4-uninstall-1.2.0.php" hash="ddba123ff4181617d314cdb61dfd2f62"/><file name="mysql4-update-1.0.4.php" hash="caf165761a59a5a9e5caf71c3654ce94"/><file name="mysql4-update-1.2.0.php" hash="5e725e4377df89a26d7a6ff1cc8f32d6"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|