Version Notes
correction de la création d'etiquettes
correction de la redirection https
Download this release
Release Info
Developer | Magento Core Team |
Extension | MondialRelay_Pointsrelais |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.4
- app/code/community/MondialRelay/Pointsrelais/Model/Carrier/Pointsrelais.php +175 -167
- app/code/community/MondialRelay/Pointsrelais/Model/Mysql4/Carrier/Pointsrelais/Collection.php +47 -47
- app/code/community/MondialRelay/Pointsrelais/Model/System/Config/Backend/Shipping/Pointsrelais.php +8 -8
- app/code/community/MondialRelay/Pointsrelais/Model/System/Config/Source/Shipping/Pointsrelais.php +14 -14
- app/code/community/MondialRelay/Pointsrelais/controllers/Sales/Order/ShipmentController.php +42 -18
- app/code/community/MondialRelay/Pointsrelais/etc/config.xml +176 -170
- app/code/community/MondialRelay/Pointsrelais/etc/system.xml +241 -225
- app/code/community/MondialRelay/Pointsrelais/sql/pointsrelais_setup/mysql4-update-1.0.4.php +40 -0
- app/design/adminhtml/default/mondialrelay/template/sales/order/shipment/create/form.phtml +0 -87
- app/design/frontend/default/default/template/pointsrelais/info.phtml +12 -3
- app/etc/modules/MondialRelay_All.xml +0 -9
- app/locale/fr_FR/MondialRelay_Pointsrelais.csv +18 -0
- package.xml +9 -8
- skin/frontend/default/default/css/iepointsrelais.css +0 -10
- skin/frontend/default/default/images/mondialrelay/Thumbs.db +0 -0
- skin/frontend/default/default/js/pointsrelais.js +45 -15
app/code/community/MondialRelay/Pointsrelais/Model/Carrier/Pointsrelais.php
CHANGED
@@ -1,168 +1,176 @@
|
|
1 |
-
<?php
|
2 |
-
class MondialRelay_Pointsrelais_Model_Carrier_Pointsrelais extends Mage_Shipping_Model_Carrier_Abstract
|
3 |
-
{
|
4 |
-
protected $_code = 'pointsrelais';
|
5 |
-
|
6 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
7 |
-
{
|
8 |
-
if (!$this->getConfigFlag('active')) {
|
9 |
-
return false;
|
10 |
-
}
|
11 |
-
|
12 |
-
// Permet de désactiver le module pour le multi-shipping
|
13 |
-
|
14 |
-
if (Mage::getSingleton('checkout/session')->getQuote()->getIsMultiShipping())
|
15 |
-
{
|
16 |
-
return false;
|
17 |
-
}
|
18 |
-
|
19 |
-
if (!$request->getConditionName()) {
|
20 |
-
$request->setConditionName($this->getConfigData('condition_name') ? $this->getConfigData('condition_name') : $this->_default_condition_name);
|
21 |
-
}
|
22 |
-
|
23 |
-
$result = Mage::getModel('shipping/rate_result');
|
24 |
-
|
25 |
-
$rates = $this->getRate($request);
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
'
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
$method
|
62 |
-
|
63 |
-
|
64 |
-
$
|
65 |
-
|
66 |
-
$
|
67 |
-
|
68 |
-
$
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
'
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
if (!isset($codes[$type]
|
114 |
-
throw Mage::exception('Mage_Shipping', Mage::helper('shipping')->__('Invalid Tablerate Rate code
|
115 |
-
}
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
$
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
}
|
1 |
+
<?php
|
2 |
+
class MondialRelay_Pointsrelais_Model_Carrier_Pointsrelais extends Mage_Shipping_Model_Carrier_Abstract
|
3 |
+
{
|
4 |
+
protected $_code = 'pointsrelais';
|
5 |
+
|
6 |
+
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
7 |
+
{
|
8 |
+
if (!$this->getConfigFlag('active')) {
|
9 |
+
return false;
|
10 |
+
}
|
11 |
+
|
12 |
+
// Permet de désactiver le module pour le multi-shipping
|
13 |
+
|
14 |
+
if (Mage::getSingleton('checkout/session')->getQuote()->getIsMultiShipping())
|
15 |
+
{
|
16 |
+
return false;
|
17 |
+
}
|
18 |
+
|
19 |
+
if (!$request->getConditionName()) {
|
20 |
+
$request->setConditionName($this->getConfigData('condition_name') ? $this->getConfigData('condition_name') : $this->_default_condition_name);
|
21 |
+
}
|
22 |
+
|
23 |
+
$result = Mage::getModel('shipping/rate_result');
|
24 |
+
|
25 |
+
$rates = $this->getRate($request);
|
26 |
+
$cartTmp = $request->_data['package_value_with_discount'];
|
27 |
+
$weghtTmp = $request->_data['package_weight'];
|
28 |
+
|
29 |
+
foreach($rates as $rate)
|
30 |
+
{
|
31 |
+
if (!empty($rate) && $rate['price'] >= 0)
|
32 |
+
{
|
33 |
+
|
34 |
+
/*---------------------------------------- Liste des points relais -----------------------------------------*/
|
35 |
+
|
36 |
+
// On met en place les paramètres de la requète
|
37 |
+
$params = array(
|
38 |
+
'Enseigne' => $this->getConfigData('enseigne'),
|
39 |
+
'Pays' => $request->_data['dest_country_id'],
|
40 |
+
'CP' => $request->_data['dest_postcode'],
|
41 |
+
);
|
42 |
+
|
43 |
+
//On crée le code de sécurité
|
44 |
+
$code = implode("",$params);
|
45 |
+
$code .= $this->getConfigData('cle');
|
46 |
+
|
47 |
+
//On le rajoute aux paramètres
|
48 |
+
$params["Security"] = strtoupper(md5($code));
|
49 |
+
|
50 |
+
// On se connecte
|
51 |
+
$client = new SoapClient("http://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");
|
52 |
+
|
53 |
+
// Et on effectue la requète
|
54 |
+
$points_relais = $client->WSI2_RecherchePointRelais($params)->WSI2_RecherchePointRelaisResult;
|
55 |
+
|
56 |
+
|
57 |
+
// On cr�e une m�thode de livraison par point relais
|
58 |
+
foreach( $points_relais as $point_relais ) {
|
59 |
+
if ( is_object($point_relais) && trim($point_relais->Num) != '' ) {
|
60 |
+
|
61 |
+
$method = Mage::getModel('shipping/rate_result_method');
|
62 |
+
|
63 |
+
$method->setCarrier('pointsrelais');
|
64 |
+
$method->setCarrierTitle($this->getConfigData('title'));
|
65 |
+
|
66 |
+
$methodTitle = $point_relais->LgAdr1 . ' - ' . $point_relais->Ville . ' <a href="#" onclick="PointsRelais.showInfo(\'' . $point_relais->Num . '\'); return false;">Détails</a> - <span style="display:none;" id="pays">' . $request->_data['dest_country_id'] . '</span>';
|
67 |
+
$method->setMethod($point_relais->Num);
|
68 |
+
$method->setMethodTitle($methodTitle);
|
69 |
+
|
70 |
+
// if($cartTmp > 34 && $weghtTmp > 0.101){
|
71 |
+
// $price = $rate['price'] = 0;
|
72 |
+
// $rate['cost'] = 0;
|
73 |
+
// $method->setPrice($price);
|
74 |
+
// $method->setCost($rate['cost']);
|
75 |
+
// }else{
|
76 |
+
$price = $rate['price'];
|
77 |
+
$method->setPrice($this->getFinalPriceWithHandlingFee($price));
|
78 |
+
$method->setCost($rate['cost']);
|
79 |
+
// }
|
80 |
+
|
81 |
+
$result->append($method);
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
return $result;
|
88 |
+
}
|
89 |
+
|
90 |
+
public function getRate(Mage_Shipping_Model_Rate_Request $request)
|
91 |
+
{
|
92 |
+
return Mage::getResourceModel('pointsrelais/carrier_pointsrelais')->getRate($request);
|
93 |
+
}
|
94 |
+
|
95 |
+
public function getCode($type, $code='')
|
96 |
+
{
|
97 |
+
$codes = array(
|
98 |
+
|
99 |
+
'condition_name'=>array(
|
100 |
+
'package_weight' => Mage::helper('shipping')->__('Weight vs. Destination'),
|
101 |
+
'package_value' => Mage::helper('shipping')->__('Price vs. Destination'),
|
102 |
+
'package_qty' => Mage::helper('shipping')->__('# of Items vs. Destination'),
|
103 |
+
),
|
104 |
+
|
105 |
+
'condition_name_short'=>array(
|
106 |
+
'package_weight' => Mage::helper('shipping')->__('Poids'),
|
107 |
+
'package_value' => Mage::helper('shipping')->__('Valeur du panier'),
|
108 |
+
'package_qty' => Mage::helper('shipping')->__('Nombre d\'articles'),
|
109 |
+
),
|
110 |
+
|
111 |
+
);
|
112 |
+
|
113 |
+
if (!isset($codes[$type])) {
|
114 |
+
throw Mage::exception('Mage_Shipping', Mage::helper('shipping')->__('Invalid Tablerate Rate code type: %s', $type));
|
115 |
+
}
|
116 |
+
|
117 |
+
if (''===$code) {
|
118 |
+
return $codes[$type];
|
119 |
+
}
|
120 |
+
|
121 |
+
if (!isset($codes[$type][$code])) {
|
122 |
+
throw Mage::exception('Mage_Shipping', Mage::helper('shipping')->__('Invalid Tablerate Rate code for type %s: %s', $type, $code));
|
123 |
+
}
|
124 |
+
|
125 |
+
return $codes[$type][$code];
|
126 |
+
}
|
127 |
+
|
128 |
+
public function getAllowedMethods()
|
129 |
+
{
|
130 |
+
return array('pointsrelais'=>$this->getConfigData('name'));
|
131 |
+
}
|
132 |
+
|
133 |
+
public function isTrackingAvailable()
|
134 |
+
{
|
135 |
+
return true;
|
136 |
+
}
|
137 |
+
|
138 |
+
public function getTrackingInfo($tracking_number)
|
139 |
+
{
|
140 |
+
$tracking_result = $this->getTracking($tracking_number);
|
141 |
+
|
142 |
+
if ($tracking_result instanceof Mage_Shipping_Model_Tracking_Result)
|
143 |
+
{
|
144 |
+
if ($trackings = $tracking_result->getAllTrackings())
|
145 |
+
{
|
146 |
+
return $trackings[0];
|
147 |
+
}
|
148 |
+
}
|
149 |
+
elseif (is_string($tracking_result) && !empty($tracking_result))
|
150 |
+
{
|
151 |
+
return $tracking_result;
|
152 |
+
}
|
153 |
+
|
154 |
+
return false;
|
155 |
+
}
|
156 |
+
|
157 |
+
protected function getTracking($tracking_number)
|
158 |
+
{
|
159 |
+
$key = '<' . $this->getConfigData('marque_url') .'>' . $tracking_number . '<' . $this->getConfigData('cle_url') . '>';
|
160 |
+
$key = md5($key);
|
161 |
+
|
162 |
+
$tracking_url = 'http://www.mondialrelay.fr/lg_fr/espaces/url/popup_exp_details.aspx?cmrq=' . strtoupper($this->getConfigData('marque_url')) .'&nexp=' . strtoupper($tracking_number) . '&crc=' . strtoupper($key) ;
|
163 |
+
|
164 |
+
$tracking_result = Mage::getModel('shipping/tracking_result');
|
165 |
+
|
166 |
+
$tracking_status = Mage::getModel('shipping/tracking_result_status');
|
167 |
+
$tracking_status->setCarrier($this->_code)
|
168 |
+
->setCarrierTitle($this->getConfigData('title'))
|
169 |
+
->setTracking($tracking_number)
|
170 |
+
->setUrl($tracking_url);
|
171 |
+
$tracking_result->append($tracking_status);
|
172 |
+
|
173 |
+
return $tracking_result;
|
174 |
+
}
|
175 |
+
|
176 |
}
|
app/code/community/MondialRelay/Pointsrelais/Model/Mysql4/Carrier/Pointsrelais/Collection.php
CHANGED
@@ -1,48 +1,48 @@
|
|
1 |
-
<?php
|
2 |
-
class MondialRelay_Pointsrelais_Model_Mysql4_Carrier_Pointsrelais_Collection extends Varien_Data_Collection_Db
|
3 |
-
{
|
4 |
-
protected $_shipTable;
|
5 |
-
protected $_countryTable;
|
6 |
-
protected $_regionTable;
|
7 |
-
|
8 |
-
public function __construct()
|
9 |
-
{
|
10 |
-
parent::__construct(Mage::getSingleton('core/resource')->getConnection('shipping_read'));
|
11 |
-
|
12 |
-
$this->_shipTable = Mage::getSingleton('core/resource')->getTableName('mondialrelay_pointsrelais');
|
13 |
-
|
14 |
-
$this->_countryTable = Mage::getSingleton('core/resource')->getTableName('directory/country');
|
15 |
-
|
16 |
-
$this->_regionTable = Mage::getSingleton('core/resource')->getTableName('directory/country_region');
|
17 |
-
|
18 |
-
$this->_select->from(array("s" => $this->_shipTable))
|
19 |
-
->joinLeft(array("c" => $this->_countryTable), 'c.country_id = s.dest_country_id', 'iso3_code AS dest_country')
|
20 |
-
->joinLeft(array("r" => $this->_regionTable), 'r.region_id = s.dest_region_id', 'code AS dest_region')
|
21 |
-
->order(array("dest_country", "dest_region", "dest_zip"));
|
22 |
-
|
23 |
-
$this->_setIdFieldName('id');
|
24 |
-
|
25 |
-
return $this;
|
26 |
-
}
|
27 |
-
|
28 |
-
public function setWebsiteFilter($websiteId)
|
29 |
-
{
|
30 |
-
$this->_select->where("website_id = ?", $websiteId);
|
31 |
-
|
32 |
-
return $this;
|
33 |
-
}
|
34 |
-
|
35 |
-
public function setConditionFilter($conditionName)
|
36 |
-
{
|
37 |
-
$this->_select->where("condition_name = ?", $conditionName);
|
38 |
-
|
39 |
-
return $this;
|
40 |
-
}
|
41 |
-
|
42 |
-
public function setCountryFilter($countryId)
|
43 |
-
{
|
44 |
-
$this->_select->where("dest_country_id = ?", $countryId);
|
45 |
-
|
46 |
-
return $this;
|
47 |
-
}
|
48 |
}
|
1 |
+
<?php
|
2 |
+
class MondialRelay_Pointsrelais_Model_Mysql4_Carrier_Pointsrelais_Collection extends Varien_Data_Collection_Db
|
3 |
+
{
|
4 |
+
protected $_shipTable;
|
5 |
+
protected $_countryTable;
|
6 |
+
protected $_regionTable;
|
7 |
+
|
8 |
+
public function __construct()
|
9 |
+
{
|
10 |
+
parent::__construct(Mage::getSingleton('core/resource')->getConnection('shipping_read'));
|
11 |
+
|
12 |
+
$this->_shipTable = Mage::getSingleton('core/resource')->getTableName('mondialrelay_pointsrelais');
|
13 |
+
|
14 |
+
$this->_countryTable = Mage::getSingleton('core/resource')->getTableName('directory/country');
|
15 |
+
|
16 |
+
$this->_regionTable = Mage::getSingleton('core/resource')->getTableName('directory/country_region');
|
17 |
+
|
18 |
+
$this->_select->from(array("s" => $this->_shipTable))
|
19 |
+
->joinLeft(array("c" => $this->_countryTable), 'c.country_id = s.dest_country_id', 'iso3_code AS dest_country')
|
20 |
+
->joinLeft(array("r" => $this->_regionTable), 'r.region_id = s.dest_region_id', 'code AS dest_region')
|
21 |
+
->order(array("dest_country", "dest_region", "dest_zip"));
|
22 |
+
|
23 |
+
$this->_setIdFieldName('id');
|
24 |
+
|
25 |
+
return $this;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function setWebsiteFilter($websiteId)
|
29 |
+
{
|
30 |
+
$this->_select->where("website_id = ?", $websiteId);
|
31 |
+
|
32 |
+
return $this;
|
33 |
+
}
|
34 |
+
|
35 |
+
public function setConditionFilter($conditionName)
|
36 |
+
{
|
37 |
+
$this->_select->where("condition_name = ?", $conditionName);
|
38 |
+
|
39 |
+
return $this;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function setCountryFilter($countryId)
|
43 |
+
{
|
44 |
+
$this->_select->where("dest_country_id = ?", $countryId);
|
45 |
+
|
46 |
+
return $this;
|
47 |
+
}
|
48 |
}
|
app/code/community/MondialRelay/Pointsrelais/Model/System/Config/Backend/Shipping/Pointsrelais.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
class MondialRelay_Pointsrelais_Model_System_Config_Backend_Shipping_Pointsrelais extends Mage_Core_Model_Config_Data
|
3 |
-
{
|
4 |
-
public function _afterSave()
|
5 |
-
{
|
6 |
-
Mage::getResourceModel('pointsrelais/carrier_pointsrelais')->uploadAndImport($this);
|
7 |
-
}
|
8 |
-
}
|
1 |
+
<?php
|
2 |
+
class MondialRelay_Pointsrelais_Model_System_Config_Backend_Shipping_Pointsrelais extends Mage_Core_Model_Config_Data
|
3 |
+
{
|
4 |
+
public function _afterSave()
|
5 |
+
{
|
6 |
+
Mage::getResourceModel('pointsrelais/carrier_pointsrelais')->uploadAndImport($this);
|
7 |
+
}
|
8 |
+
}
|
app/code/community/MondialRelay/Pointsrelais/Model/System/Config/Source/Shipping/Pointsrelais.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
<?php
|
2 |
-
class MondialRelay_Pointsrelais_Model_System_Config_Source_Shipping_Pointsrelais
|
3 |
-
{
|
4 |
-
public function toOptionArray()
|
5 |
-
{
|
6 |
-
$tableRate = Mage::getSingleton('pointsrelais/carrier_pointsrelais');
|
7 |
-
$arr = array();
|
8 |
-
|
9 |
-
foreach ($tableRate->getCode('condition_name') as $k=>$v)
|
10 |
-
{
|
11 |
-
$arr[] = array('value'=>$k, 'label'=>$v);
|
12 |
-
}
|
13 |
-
return $arr;
|
14 |
-
}
|
15 |
}
|
1 |
+
<?php
|
2 |
+
class MondialRelay_Pointsrelais_Model_System_Config_Source_Shipping_Pointsrelais
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
$tableRate = Mage::getSingleton('pointsrelais/carrier_pointsrelais');
|
7 |
+
$arr = array();
|
8 |
+
|
9 |
+
foreach ($tableRate->getCode('condition_name') as $k=>$v)
|
10 |
+
{
|
11 |
+
$arr[] = array('value'=>$k, 'label'=>$v);
|
12 |
+
}
|
13 |
+
return $arr;
|
14 |
+
}
|
15 |
}
|
app/code/community/MondialRelay/Pointsrelais/controllers/Sales/Order/ShipmentController.php
CHANGED
@@ -69,37 +69,48 @@ class MondialRelay_Pointsrelais_Sales_Order_ShipmentController extends Mage_Admi
|
|
69 |
{
|
70 |
$adress[1] = '';
|
71 |
}
|
|
|
|
|
|
|
|
|
72 |
$params = array(
|
73 |
'Enseigne' => $this->getConfigData('enseigne'),
|
74 |
'ModeCol' => 'CCC',
|
75 |
'ModeLiv' => '24R',
|
76 |
'Expe_Langage' => 'FR',
|
77 |
-
'Expe_Ad1' => $this->getConfigData('adresse1_enseigne'),
|
78 |
-
'Expe_Ad3' => $this->getConfigData('adresse3_enseigne'),
|
79 |
-
'Expe_Ad4' => $this->getConfigData('adresse4_enseigne'),
|
80 |
-
'Expe_Ville' => $this->getConfigData('ville_enseigne'),
|
81 |
'Expe_CP' => $this->getConfigData('cp_enseigne'),
|
82 |
-
'Expe_Pays' => $this->getConfigData('pays_enseigne'),
|
83 |
-
'Expe_Tel1' =>
|
84 |
-
'Expe_Tel2' =>
|
85 |
'Expe_Mail' => $this->getConfigData('mail_enseigne'),
|
86 |
'Dest_Langage' => 'FR',
|
87 |
-
'Dest_Ad1' => $_order->getShippingAddress()->getFirstname() . ' ' . $_order->getShippingAddress()->getLastname(),
|
88 |
-
'Dest_Ad2' => $_order->getShippingAddress()->getCompagny(),
|
89 |
-
'Dest_Ad3' => $adress[0],
|
90 |
-
'Dest_Ad4' => $adress[1],
|
91 |
-
'Dest_Ville' => $_order->getShippingAddress()->getCity(),
|
92 |
'Dest_CP' => $_order->getShippingAddress()->getPostcode(),
|
93 |
-
'Dest_Pays' => $_order->getShippingAddress()->getCountryId(),
|
94 |
-
'Dest_Tel1' =>
|
95 |
'Dest_Mail' => $_order->getCustomerEmail(),
|
96 |
-
'Poids' => $
|
97 |
'NbColis' => '1',
|
98 |
'CRT_Valeur' => '0',
|
99 |
'LIV_Rel_Pays' => $_order->getShippingAddress()->getCountryId(),
|
100 |
'LIV_Rel' => $_shippingMethod[1]
|
101 |
-
)
|
102 |
//On crée le code de sécurité
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
$code = implode("",$params);
|
104 |
$code .= $this->getConfigData('cle');
|
105 |
|
@@ -112,6 +123,7 @@ class MondialRelay_Pointsrelais_Sales_Order_ShipmentController extends Mage_Admi
|
|
112 |
// Et on effectue la requète
|
113 |
$expedition = $client->WSI2_CreationExpedition($params)->WSI2_CreationExpeditionResult;
|
114 |
|
|
|
115 |
$track = Mage::getModel('sales/order_shipment_track')
|
116 |
->setNumber($expedition->ExpeditionNum)
|
117 |
->setCarrier('Mondial Relay')
|
@@ -134,7 +146,7 @@ class MondialRelay_Pointsrelais_Sales_Order_ShipmentController extends Mage_Admi
|
|
134 |
$this->_saveShipment($shipment);
|
135 |
$shipment->sendEmail(!empty($data['send_email']), $comment);
|
136 |
$this->_getSession()->addSuccess($this->__('Shipment was successfully created.'));
|
137 |
-
$this->_redirect('
|
138 |
return;
|
139 |
}
|
140 |
else {
|
@@ -146,9 +158,21 @@ class MondialRelay_Pointsrelais_Sales_Order_ShipmentController extends Mage_Admi
|
|
146 |
$this->_getSession()->addError($e->getMessage());
|
147 |
}
|
148 |
catch (Exception $e) {
|
149 |
-
$this->_getSession()->addError($this->__('Can not save shipment
|
150 |
}
|
151 |
$this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
|
152 |
}
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
}
|
69 |
{
|
70 |
$adress[1] = '';
|
71 |
}
|
72 |
+
$package_weightTmp = $_order->getWeight()*1000;
|
73 |
+
if($package_weightTmp < 100){
|
74 |
+
$package_weightTmp = 100;
|
75 |
+
}
|
76 |
$params = array(
|
77 |
'Enseigne' => $this->getConfigData('enseigne'),
|
78 |
'ModeCol' => 'CCC',
|
79 |
'ModeLiv' => '24R',
|
80 |
'Expe_Langage' => 'FR',
|
81 |
+
'Expe_Ad1' => trim($this->removeaccents($this->getConfigData('adresse1_enseigne'))),
|
82 |
+
'Expe_Ad3' => trim($this->removeaccents($this->getConfigData('adresse3_enseigne'))),
|
83 |
+
'Expe_Ad4' => trim($this->removeaccents($this->getConfigData('adresse4_enseigne'))),
|
84 |
+
'Expe_Ville' => trim($this->removeaccents($this->getConfigData('ville_enseigne'))),
|
85 |
'Expe_CP' => $this->getConfigData('cp_enseigne'),
|
86 |
+
'Expe_Pays' => trim($this->removeaccents($this->getConfigData('pays_enseigne'))),
|
87 |
+
'Expe_Tel1' => '',
|
88 |
+
'Expe_Tel2' => '',
|
89 |
'Expe_Mail' => $this->getConfigData('mail_enseigne'),
|
90 |
'Dest_Langage' => 'FR',
|
91 |
+
'Dest_Ad1' => trim($this->removeaccents($_order->getShippingAddress()->getFirstname() . ' ' . $_order->getShippingAddress()->getLastname())),
|
92 |
+
'Dest_Ad2' => trim($this->removeaccents($_order->getShippingAddress()->getCompagny())),
|
93 |
+
'Dest_Ad3' => trim($this->removeaccents($adress[0])),
|
94 |
+
'Dest_Ad4' => trim($this->removeaccents($adress[1])),
|
95 |
+
'Dest_Ville' => trim($this->removeaccents($_order->getShippingAddress()->getCity())),
|
96 |
'Dest_CP' => $_order->getShippingAddress()->getPostcode(),
|
97 |
+
'Dest_Pays' => trim($this->removeaccents($_order->getShippingAddress()->getCountryId())),
|
98 |
+
'Dest_Tel1' => '',
|
99 |
'Dest_Mail' => $_order->getCustomerEmail(),
|
100 |
+
'Poids' => $package_weightTmp,
|
101 |
'NbColis' => '1',
|
102 |
'CRT_Valeur' => '0',
|
103 |
'LIV_Rel_Pays' => $_order->getShippingAddress()->getCountryId(),
|
104 |
'LIV_Rel' => $_shippingMethod[1]
|
105 |
+
);//$_order->getWeight()*1000,
|
106 |
//On crée le code de sécurité
|
107 |
+
|
108 |
+
$select = "";
|
109 |
+
foreach($params as $key => $value){
|
110 |
+
$select .= "\t".'<option value="'.$key.'">' . $value.'</option>'."\r\n";
|
111 |
+
}
|
112 |
+
Mage::Log('WSI2_CreationExpeditionResult$params : '.($select));
|
113 |
+
|
114 |
$code = implode("",$params);
|
115 |
$code .= $this->getConfigData('cle');
|
116 |
|
123 |
// Et on effectue la requète
|
124 |
$expedition = $client->WSI2_CreationExpedition($params)->WSI2_CreationExpeditionResult;
|
125 |
|
126 |
+
Mage::Log('WSI2_CreationExpeditionResult : '.($expedition->STAT));
|
127 |
$track = Mage::getModel('sales/order_shipment_track')
|
128 |
->setNumber($expedition->ExpeditionNum)
|
129 |
->setCarrier('Mondial Relay')
|
146 |
$this->_saveShipment($shipment);
|
147 |
$shipment->sendEmail(!empty($data['send_email']), $comment);
|
148 |
$this->_getSession()->addSuccess($this->__('Shipment was successfully created.'));
|
149 |
+
$this->_redirect('adminhtml/sales_order/view', array('order_id' => $shipment->getOrderId()));
|
150 |
return;
|
151 |
}
|
152 |
else {
|
158 |
$this->_getSession()->addError($e->getMessage());
|
159 |
}
|
160 |
catch (Exception $e) {
|
161 |
+
$this->_getSession()->addError($this->__('Can not save shipment: '.$e->getMessage()));
|
162 |
}
|
163 |
$this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
|
164 |
}
|
165 |
|
166 |
+
Function removeaccents($string){
|
167 |
+
$stringToReturn = str_replace(
|
168 |
+
array('�','�','�','�','�', '�', '�','�','�','�', '�','�','�','�', '�', '�','�','�','�','�', '�','�','�','�', '�','�', '�','�','�','�','�', '�', '�','�','�','�', '�','�','�','�', '�', '�','�','�','�','�', '�','�','�','�', '�','/','\xa8'),
|
169 |
+
array('a','a','a','a','a', 'c', 'e','e','e','e', 'i','i','i','i', 'n', 'o','o','o','o','o', 'u','u','u','u', 'y','y', 'A','A','A','A','A', 'C', 'E','E','E','E', 'I','I','I','I', 'N', 'O','O','O','O','O', 'U','U','U','U', 'Y',' ','e'), $string);
|
170 |
+
// Remove all remaining other unknown characters
|
171 |
+
$stringToReturn = preg_replace('/[^a-zA-Z0-9\-]/', ' ', $stringToReturn);
|
172 |
+
$stringToReturn = preg_replace('/^[\-]+/', '', $stringToReturn);
|
173 |
+
$stringToReturn = preg_replace('/[\-]+$/', '', $stringToReturn);
|
174 |
+
$stringToReturn = preg_replace('/[\-]{2,}/', ' ', $stringToReturn);
|
175 |
+
return $stringToReturn;
|
176 |
+
}
|
177 |
+
|
178 |
}
|
app/code/community/MondialRelay/Pointsrelais/etc/config.xml
CHANGED
@@ -1,170 +1,176 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<MondialRelay_Pointsrelais>
|
5 |
-
<version>1.0.
|
6 |
-
<depends>
|
7 |
-
<Mage_Adminhtml />
|
8 |
-
<Mage_Shipping />
|
9 |
-
</depends>
|
10 |
-
</MondialRelay_Pointsrelais>
|
11 |
-
</modules>
|
12 |
-
<default>
|
13 |
-
<carriers>
|
14 |
-
<pointsrelais>
|
15 |
-
<active>0</active>
|
16 |
-
<sallowspecific>0</sallowspecific>
|
17 |
-
<model>pointsrelais/carrier_pointsrelais</model>
|
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 |
-
</carriers>
|
23 |
-
</default>
|
24 |
-
<global>
|
25 |
-
<models>
|
26 |
-
<pointsrelais>
|
27 |
-
<class>MondialRelay_Pointsrelais_Model</class>
|
28 |
-
<resourceModel>pointsrelais_mysql4</resourceModel>
|
29 |
-
</pointsrelais>
|
30 |
-
<pointsrelais_mysql4>
|
31 |
-
<class>MondialRelay_Pointsrelais_Model_Mysql4</class>
|
32 |
-
<entities>
|
33 |
-
<pointsrelais>
|
34 |
-
<table>mondialrelay_pointsrelais</table>
|
35 |
-
</pointsrelais>
|
36 |
-
</entities>
|
37 |
-
</pointsrelais_mysql4>
|
38 |
-
<adminhtml>
|
39 |
-
<rewrite>
|
40 |
-
<system_config_source_shipping_pointsrelais>MondialRelay_Pointsrelais_Model_System_Config_Source_Shipping_Pointsrelais</system_config_source_shipping_pointsrelais>
|
41 |
-
</rewrite>
|
42 |
-
<rewrite>
|
43 |
-
<system_config_backend_shipping_pointsrelais>MondialRelay_Pointsrelais_Model_System_Config_Backend_Shipping_Pointsrelais</system_config_backend_shipping_pointsrelais>
|
44 |
-
</rewrite>
|
45 |
-
</adminhtml>
|
46 |
-
</models>
|
47 |
-
<blocks>
|
48 |
-
<pointsrelais>
|
49 |
-
<class>MondialRelay_Pointsrelais_Block</class>
|
50 |
-
</pointsrelais>
|
51 |
-
<adminhtml>
|
52 |
-
<rewrite>
|
53 |
-
<system_config_form>MondialRelay_Pointsrelais_Block_System_Config_Form</system_config_form>
|
54 |
-
<system_config_form_field_exportpointsrelais>MondialRelay_Pointsrelais_Block_System_Config_Form_Field_Exportpointsrelais</system_config_form_field_exportpointsrelais>
|
55 |
-
<sales_order_shipment_view>MondialRelay_Pointsrelais_Block_Sales_Order_Shipment_View</sales_order_shipment_view>
|
56 |
-
</rewrite>
|
57 |
-
</adminhtml>
|
58 |
-
</blocks>
|
59 |
-
<resources>
|
60 |
-
<pointsrelais_setup>
|
61 |
-
<setup>
|
62 |
-
<module>MondialRelay_Pointsrelais</module>
|
63 |
-
</setup>
|
64 |
-
<connection>
|
65 |
-
<use>core_setup</use>
|
66 |
-
</connection>
|
67 |
-
</pointsrelais_setup>
|
68 |
-
</resources>
|
69 |
-
<helpers>
|
70 |
-
<pointsrelais>
|
71 |
-
<class>MondialRelay_Pointsrelais_Helper</class>
|
72 |
-
</pointsrelais>
|
73 |
-
</helpers>
|
74 |
-
<rewrite>
|
75 |
-
<mondialrelay_pointsrelais_sales_order_shipment>
|
76 |
-
<from><![CDATA[#^/.*sales_order_shipment/#]]></from>
|
77 |
-
<to>/pointsrelais/sales_order_shipment/</to>
|
78 |
-
</mondialrelay_pointsrelais_sales_order_shipment>
|
79 |
-
</rewrite>
|
80 |
-
</global>
|
81 |
-
<frontend>
|
82 |
-
<events>
|
83 |
-
<sales_convert_quote_address_to_order>
|
84 |
-
<observers>
|
85 |
-
<change_adress>
|
86 |
-
<type>singleton</type>
|
87 |
-
<class>MondialRelay_Pointsrelais_Model_Observer</class>
|
88 |
-
<method>changeAddress</method>
|
89 |
-
</change_adress>
|
90 |
-
</observers>
|
91 |
-
</sales_convert_quote_address_to_order>
|
92 |
-
</events>
|
93 |
-
<routers>
|
94 |
-
<pointsrelais>
|
95 |
-
<use>standard</use>
|
96 |
-
<args>
|
97 |
-
<module>MondialRelay_Pointsrelais</module>
|
98 |
-
<frontName>pointsrelais</frontName>
|
99 |
-
</args>
|
100 |
-
</pointsrelais>
|
101 |
-
</routers>
|
102 |
-
<layout>
|
103 |
-
<updates>
|
104 |
-
<pointsrelais>
|
105 |
-
<file>pointsrelais.xml</file>
|
106 |
-
</pointsrelais>
|
107 |
-
</updates>
|
108 |
-
</layout>
|
109 |
-
</frontend>
|
110 |
-
<admin>
|
111 |
-
<routers>
|
112 |
-
<pointsrelais>
|
113 |
-
<use>admin</use>
|
114 |
-
<args>
|
115 |
-
<module>MondialRelay_Pointsrelais</module>
|
116 |
-
<frontName>pointsrelais</frontName>
|
117 |
-
</args>
|
118 |
-
</pointsrelais>
|
119 |
-
</routers>
|
120 |
-
</admin>
|
121 |
-
<adminhtml>
|
122 |
-
<menu>
|
123 |
-
<sales translate="title" module="pointsrelais">
|
124 |
-
<title>Sales</title>
|
125 |
-
<sort_order>20</sort_order>
|
126 |
-
<depends><module>Mage_Sales</module></depends>
|
127 |
-
<children>
|
128 |
-
<mondialrelay translate="title" module="sales">
|
129 |
-
<title>Mondial Relay</title>
|
130 |
-
<sort_order>31</sort_order>
|
131 |
-
<children>
|
132 |
-
<impression translate="title" module="sales">
|
133 |
-
<title>Impression des étiquettes</title>
|
134 |
-
<action>pointsrelais/sales_impression</action>
|
135 |
-
<sort_order>10</sort_order>
|
136 |
-
</impression>
|
137 |
-
</children>
|
138 |
-
</mondialrelay>
|
139 |
-
</children>
|
140 |
-
</sales>
|
141 |
-
</menu>
|
142 |
-
<acl>
|
143 |
-
<resources>
|
144 |
-
<admin>
|
145 |
-
<children>
|
146 |
-
<sales translate="title" module="sales">
|
147 |
-
<title>Sales</title>
|
148 |
-
<sort_order>20</sort_order>
|
149 |
-
<children>
|
150 |
-
<mondialrelay translate="title" module="sales">
|
151 |
-
<title>Mondial Relay</title>
|
152 |
-
<sort_order>31</sort_order>
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<MondialRelay_Pointsrelais>
|
5 |
+
<version>1.0.4</version>
|
6 |
+
<depends>
|
7 |
+
<Mage_Adminhtml />
|
8 |
+
<Mage_Shipping />
|
9 |
+
</depends>
|
10 |
+
</MondialRelay_Pointsrelais>
|
11 |
+
</modules>
|
12 |
+
<default>
|
13 |
+
<carriers>
|
14 |
+
<pointsrelais>
|
15 |
+
<active>0</active>
|
16 |
+
<sallowspecific>0</sallowspecific>
|
17 |
+
<model>pointsrelais/carrier_pointsrelais</model>
|
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 |
+
</carriers>
|
23 |
+
</default>
|
24 |
+
<global>
|
25 |
+
<models>
|
26 |
+
<pointsrelais>
|
27 |
+
<class>MondialRelay_Pointsrelais_Model</class>
|
28 |
+
<resourceModel>pointsrelais_mysql4</resourceModel>
|
29 |
+
</pointsrelais>
|
30 |
+
<pointsrelais_mysql4>
|
31 |
+
<class>MondialRelay_Pointsrelais_Model_Mysql4</class>
|
32 |
+
<entities>
|
33 |
+
<pointsrelais>
|
34 |
+
<table>mondialrelay_pointsrelais</table>
|
35 |
+
</pointsrelais>
|
36 |
+
</entities>
|
37 |
+
</pointsrelais_mysql4>
|
38 |
+
<adminhtml>
|
39 |
+
<rewrite>
|
40 |
+
<system_config_source_shipping_pointsrelais>MondialRelay_Pointsrelais_Model_System_Config_Source_Shipping_Pointsrelais</system_config_source_shipping_pointsrelais>
|
41 |
+
</rewrite>
|
42 |
+
<rewrite>
|
43 |
+
<system_config_backend_shipping_pointsrelais>MondialRelay_Pointsrelais_Model_System_Config_Backend_Shipping_Pointsrelais</system_config_backend_shipping_pointsrelais>
|
44 |
+
</rewrite>
|
45 |
+
</adminhtml>
|
46 |
+
</models>
|
47 |
+
<blocks>
|
48 |
+
<pointsrelais>
|
49 |
+
<class>MondialRelay_Pointsrelais_Block</class>
|
50 |
+
</pointsrelais>
|
51 |
+
<adminhtml>
|
52 |
+
<rewrite>
|
53 |
+
<system_config_form>MondialRelay_Pointsrelais_Block_System_Config_Form</system_config_form>
|
54 |
+
<system_config_form_field_exportpointsrelais>MondialRelay_Pointsrelais_Block_System_Config_Form_Field_Exportpointsrelais</system_config_form_field_exportpointsrelais>
|
55 |
+
<sales_order_shipment_view>MondialRelay_Pointsrelais_Block_Sales_Order_Shipment_View</sales_order_shipment_view>
|
56 |
+
</rewrite>
|
57 |
+
</adminhtml>
|
58 |
+
</blocks>
|
59 |
+
<resources>
|
60 |
+
<pointsrelais_setup>
|
61 |
+
<setup>
|
62 |
+
<module>MondialRelay_Pointsrelais</module>
|
63 |
+
</setup>
|
64 |
+
<connection>
|
65 |
+
<use>core_setup</use>
|
66 |
+
</connection>
|
67 |
+
</pointsrelais_setup>
|
68 |
+
</resources>
|
69 |
+
<helpers>
|
70 |
+
<pointsrelais>
|
71 |
+
<class>MondialRelay_Pointsrelais_Helper</class>
|
72 |
+
</pointsrelais>
|
73 |
+
</helpers>
|
74 |
+
<rewrite>
|
75 |
+
<mondialrelay_pointsrelais_sales_order_shipment>
|
76 |
+
<from><![CDATA[#^/.*sales_order_shipment/save/#]]></from>
|
77 |
+
<to>/pointsrelais/sales_order_shipment/save/</to>
|
78 |
+
</mondialrelay_pointsrelais_sales_order_shipment>
|
79 |
+
</rewrite>
|
80 |
+
</global>
|
81 |
+
<frontend>
|
82 |
+
<events>
|
83 |
+
<sales_convert_quote_address_to_order>
|
84 |
+
<observers>
|
85 |
+
<change_adress>
|
86 |
+
<type>singleton</type>
|
87 |
+
<class>MondialRelay_Pointsrelais_Model_Observer</class>
|
88 |
+
<method>changeAddress</method>
|
89 |
+
</change_adress>
|
90 |
+
</observers>
|
91 |
+
</sales_convert_quote_address_to_order>
|
92 |
+
</events>
|
93 |
+
<routers>
|
94 |
+
<pointsrelais>
|
95 |
+
<use>standard</use>
|
96 |
+
<args>
|
97 |
+
<module>MondialRelay_Pointsrelais</module>
|
98 |
+
<frontName>pointsrelais</frontName>
|
99 |
+
</args>
|
100 |
+
</pointsrelais>
|
101 |
+
</routers>
|
102 |
+
<layout>
|
103 |
+
<updates>
|
104 |
+
<pointsrelais>
|
105 |
+
<file>pointsrelais.xml</file>
|
106 |
+
</pointsrelais>
|
107 |
+
</updates>
|
108 |
+
</layout>
|
109 |
+
</frontend>
|
110 |
+
<admin>
|
111 |
+
<routers>
|
112 |
+
<pointsrelais>
|
113 |
+
<use>admin</use>
|
114 |
+
<args>
|
115 |
+
<module>MondialRelay_Pointsrelais</module>
|
116 |
+
<frontName>pointsrelais</frontName>
|
117 |
+
</args>
|
118 |
+
</pointsrelais>
|
119 |
+
</routers>
|
120 |
+
</admin>
|
121 |
+
<adminhtml>
|
122 |
+
<menu>
|
123 |
+
<sales translate="title" module="pointsrelais">
|
124 |
+
<title>Sales</title>
|
125 |
+
<sort_order>20</sort_order>
|
126 |
+
<depends><module>Mage_Sales</module></depends>
|
127 |
+
<children>
|
128 |
+
<mondialrelay translate="title" module="sales">
|
129 |
+
<title>Mondial Relay</title>
|
130 |
+
<sort_order>31</sort_order>
|
131 |
+
<children>
|
132 |
+
<impression translate="title" module="sales">
|
133 |
+
<title>Impression des étiquettes</title>
|
134 |
+
<action>pointsrelais/sales_impression</action>
|
135 |
+
<sort_order>10</sort_order>
|
136 |
+
</impression>
|
137 |
+
</children>
|
138 |
+
</mondialrelay>
|
139 |
+
</children>
|
140 |
+
</sales>
|
141 |
+
</menu>
|
142 |
+
<acl>
|
143 |
+
<resources>
|
144 |
+
<admin>
|
145 |
+
<children>
|
146 |
+
<sales translate="title" module="sales">
|
147 |
+
<title>Sales</title>
|
148 |
+
<sort_order>20</sort_order>
|
149 |
+
<children>
|
150 |
+
<mondialrelay translate="title" module="sales">
|
151 |
+
<title>Mondial Relay</title>
|
152 |
+
<sort_order>31</sort_order>
|
153 |
+
<children>
|
154 |
+
<impression translate="title" module="sales">
|
155 |
+
<title>Impression des étiquettes</title>
|
156 |
+
<sort_order>10</sort_order>
|
157 |
+
</impression>
|
158 |
+
</children>
|
159 |
+
</mondialrelay>
|
160 |
+
</children>
|
161 |
+
</sales>
|
162 |
+
</children>
|
163 |
+
</admin>
|
164 |
+
</resources>
|
165 |
+
</acl>
|
166 |
+
</adminhtml>
|
167 |
+
<stores>
|
168 |
+
<admin>
|
169 |
+
<design>
|
170 |
+
<theme>
|
171 |
+
<default>mondialrelay</default>
|
172 |
+
</theme>
|
173 |
+
</design>
|
174 |
+
</admin>
|
175 |
+
</stores>
|
176 |
+
</config>
|
app/code/community/MondialRelay/Pointsrelais/etc/system.xml
CHANGED
@@ -1,226 +1,242 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<sections>
|
4 |
-
<carriers>
|
5 |
-
<groups>
|
6 |
-
<pointsrelais translate="label" module="shipping">
|
7 |
-
<label>Mondial Relay</label>
|
8 |
-
<frontend_type>text</frontend_type>
|
9 |
-
<sort_order>1</sort_order>
|
10 |
-
<show_in_default>1</show_in_default>
|
11 |
-
<show_in_website>1</show_in_website>
|
12 |
-
<show_in_store>1</show_in_store>
|
13 |
-
<fields>
|
14 |
-
<active translate="label">
|
15 |
-
<label>Enabled</label>
|
16 |
-
<frontend_type>select</frontend_type>
|
17 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
18 |
-
<sort_order>1</sort_order>
|
19 |
-
<show_in_default>1</show_in_default>
|
20 |
-
<show_in_website>1</show_in_website>
|
21 |
-
<show_in_store>1</show_in_store>
|
22 |
-
</active>
|
23 |
-
<enseigne translate="label">
|
24 |
-
<label>Enseigne</label>
|
25 |
-
<frontend_type>text</frontend_type>
|
26 |
-
<sort_order>
|
27 |
-
<show_in_default>1</show_in_default>
|
28 |
-
<show_in_website>1</show_in_website>
|
29 |
-
<show_in_store>1</show_in_store>
|
30 |
-
</enseigne>
|
31 |
-
<marque translate="label">
|
32 |
-
<label>Référence de marque</label>
|
33 |
-
<frontend_type>text</frontend_type>
|
34 |
-
<sort_order>3</sort_order>
|
35 |
-
<show_in_default>1</show_in_default>
|
36 |
-
<show_in_website>1</show_in_website>
|
37 |
-
<show_in_store>1</show_in_store>
|
38 |
-
</marque>
|
39 |
-
<cle translate="label">
|
40 |
-
<label>
|
41 |
-
<frontend_type>text</frontend_type>
|
42 |
-
<sort_order>4</sort_order>
|
43 |
-
<show_in_default>1</show_in_default>
|
44 |
-
<show_in_website>1</show_in_website>
|
45 |
-
<show_in_store>1</show_in_store>
|
46 |
-
</cle>
|
47 |
-
<
|
48 |
-
<label>
|
49 |
-
<
|
50 |
-
<
|
51 |
-
<
|
52 |
-
<
|
53 |
-
<
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
<
|
58 |
-
<
|
59 |
-
<
|
60 |
-
<
|
61 |
-
<
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
<
|
66 |
-
<frontend_type>text</frontend_type>
|
67 |
-
<sort_order>7</sort_order>
|
68 |
-
<show_in_default>1</show_in_default>
|
69 |
-
<show_in_website>1</show_in_website>
|
70 |
-
<show_in_store>1</show_in_store>
|
71 |
-
</
|
72 |
-
<
|
73 |
-
<label>
|
74 |
-
<frontend_type>text</frontend_type>
|
75 |
-
<sort_order>8</sort_order>
|
76 |
-
<show_in_default>1</show_in_default>
|
77 |
-
<show_in_website>1</show_in_website>
|
78 |
-
<show_in_store>1</show_in_store>
|
79 |
-
</
|
80 |
-
<
|
81 |
-
<label>
|
82 |
-
<frontend_type>text</frontend_type>
|
83 |
-
<sort_order>9</sort_order>
|
84 |
-
<show_in_default>1</show_in_default>
|
85 |
-
<show_in_website>1</show_in_website>
|
86 |
-
<show_in_store>1</show_in_store>
|
87 |
-
</
|
88 |
-
<
|
89 |
-
<label>
|
90 |
-
<frontend_type>text</frontend_type>
|
91 |
-
<sort_order>10</sort_order>
|
92 |
-
<show_in_default>1</show_in_default>
|
93 |
-
<show_in_website>1</show_in_website>
|
94 |
-
<show_in_store>1</show_in_store>
|
95 |
-
</
|
96 |
-
<
|
97 |
-
<label>Code
|
98 |
-
<
|
99 |
-
<
|
100 |
-
<
|
101 |
-
<
|
102 |
-
<
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
<
|
107 |
-
<
|
108 |
-
<
|
109 |
-
<
|
110 |
-
<
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
<
|
115 |
-
<
|
116 |
-
<
|
117 |
-
<
|
118 |
-
<
|
119 |
-
<
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
<
|
124 |
-
<
|
125 |
-
<
|
126 |
-
<
|
127 |
-
<
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
<
|
133 |
-
<
|
134 |
-
<
|
135 |
-
<
|
136 |
-
<
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
<
|
142 |
-
<
|
143 |
-
<
|
144 |
-
<
|
145 |
-
<
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
<
|
150 |
-
<
|
151 |
-
<
|
152 |
-
<
|
153 |
-
<
|
154 |
-
<
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
<
|
160 |
-
<
|
161 |
-
<
|
162 |
-
<
|
163 |
-
|
164 |
-
|
165 |
-
<
|
166 |
-
|
167 |
-
|
168 |
-
<
|
169 |
-
<
|
170 |
-
|
171 |
-
<
|
172 |
-
<
|
173 |
-
|
174 |
-
|
175 |
-
<
|
176 |
-
|
177 |
-
|
178 |
-
<
|
179 |
-
<
|
180 |
-
<
|
181 |
-
<
|
182 |
-
|
183 |
-
|
184 |
-
<
|
185 |
-
<
|
186 |
-
|
187 |
-
|
188 |
-
<
|
189 |
-
<
|
190 |
-
<
|
191 |
-
<
|
192 |
-
|
193 |
-
|
194 |
-
<
|
195 |
-
|
196 |
-
|
197 |
-
<
|
198 |
-
<
|
199 |
-
<
|
200 |
-
<
|
201 |
-
<
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
<
|
207 |
-
<
|
208 |
-
<
|
209 |
-
<
|
210 |
-
<
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
<
|
215 |
-
<
|
216 |
-
<
|
217 |
-
<show_in_default>1</show_in_default>
|
218 |
-
<show_in_website>1</show_in_website>
|
219 |
-
<show_in_store>1</show_in_store>
|
220 |
-
</
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<carriers>
|
5 |
+
<groups>
|
6 |
+
<pointsrelais translate="label" module="shipping">
|
7 |
+
<label>Mondial Relay</label>
|
8 |
+
<frontend_type>text</frontend_type>
|
9 |
+
<sort_order>1</sort_order>
|
10 |
+
<show_in_default>1</show_in_default>
|
11 |
+
<show_in_website>1</show_in_website>
|
12 |
+
<show_in_store>1</show_in_store>
|
13 |
+
<fields>
|
14 |
+
<active translate="label">
|
15 |
+
<label>Enabled</label>
|
16 |
+
<frontend_type>select</frontend_type>
|
17 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
18 |
+
<sort_order>1</sort_order>
|
19 |
+
<show_in_default>1</show_in_default>
|
20 |
+
<show_in_website>1</show_in_website>
|
21 |
+
<show_in_store>1</show_in_store>
|
22 |
+
</active>
|
23 |
+
<enseigne translate="label">
|
24 |
+
<label>Enseigne</label>
|
25 |
+
<frontend_type>text</frontend_type>
|
26 |
+
<sort_order>2</sort_order>
|
27 |
+
<show_in_default>1</show_in_default>
|
28 |
+
<show_in_website>1</show_in_website>
|
29 |
+
<show_in_store>1</show_in_store>
|
30 |
+
</enseigne>
|
31 |
+
<marque translate="label">
|
32 |
+
<label>Référence de marque (Web service)</label>
|
33 |
+
<frontend_type>text</frontend_type>
|
34 |
+
<sort_order>3</sort_order>
|
35 |
+
<show_in_default>1</show_in_default>
|
36 |
+
<show_in_website>1</show_in_website>
|
37 |
+
<show_in_store>1</show_in_store>
|
38 |
+
</marque>
|
39 |
+
<cle translate="label">
|
40 |
+
<label>Clé (Web service)</label>
|
41 |
+
<frontend_type>text</frontend_type>
|
42 |
+
<sort_order>4</sort_order>
|
43 |
+
<show_in_default>1</show_in_default>
|
44 |
+
<show_in_website>1</show_in_website>
|
45 |
+
<show_in_store>1</show_in_store>
|
46 |
+
</cle>
|
47 |
+
<marque_url translate="label">
|
48 |
+
<label>Référence de marque (tracking)</label>
|
49 |
+
<frontend_type>text</frontend_type>
|
50 |
+
<sort_order>5</sort_order>
|
51 |
+
<show_in_default>1</show_in_default>
|
52 |
+
<show_in_website>1</show_in_website>
|
53 |
+
<show_in_store>1</show_in_store>
|
54 |
+
</marque_url>
|
55 |
+
<cle_url translate="label">
|
56 |
+
<label>Clé (tracking)</label>
|
57 |
+
<frontend_type>text</frontend_type>
|
58 |
+
<sort_order>6</sort_order>
|
59 |
+
<show_in_default>1</show_in_default>
|
60 |
+
<show_in_website>1</show_in_website>
|
61 |
+
<show_in_store>1</show_in_store>
|
62 |
+
</cle_url>
|
63 |
+
<adresse1_enseigne translate="label">
|
64 |
+
<label>Nom de l'expéditeur</label>
|
65 |
+
<comment>Sans accent svp...</comment>
|
66 |
+
<frontend_type>text</frontend_type>
|
67 |
+
<sort_order>7</sort_order>
|
68 |
+
<show_in_default>1</show_in_default>
|
69 |
+
<show_in_website>1</show_in_website>
|
70 |
+
<show_in_store>1</show_in_store>
|
71 |
+
</adresse1_enseigne>
|
72 |
+
<adresse3_enseigne translate="label">
|
73 |
+
<label>Adresse de l'expéditeur</label>
|
74 |
+
<frontend_type>text</frontend_type>
|
75 |
+
<sort_order>8</sort_order>
|
76 |
+
<show_in_default>1</show_in_default>
|
77 |
+
<show_in_website>1</show_in_website>
|
78 |
+
<show_in_store>1</show_in_store>
|
79 |
+
</adresse3_enseigne>
|
80 |
+
<adresse4_enseigne translate="label">
|
81 |
+
<label>Complément d'adresse</label>
|
82 |
+
<frontend_type>text</frontend_type>
|
83 |
+
<sort_order>9</sort_order>
|
84 |
+
<show_in_default>1</show_in_default>
|
85 |
+
<show_in_website>1</show_in_website>
|
86 |
+
<show_in_store>1</show_in_store>
|
87 |
+
</adresse4_enseigne>
|
88 |
+
<adresse4_enseigne translate="label">
|
89 |
+
<label>Complément d'adresse</label>
|
90 |
+
<frontend_type>text</frontend_type>
|
91 |
+
<sort_order>10</sort_order>
|
92 |
+
<show_in_default>1</show_in_default>
|
93 |
+
<show_in_website>1</show_in_website>
|
94 |
+
<show_in_store>1</show_in_store>
|
95 |
+
</adresse4_enseigne>
|
96 |
+
<cp_enseigne translate="label">
|
97 |
+
<label>Code postal</label>
|
98 |
+
<frontend_type>text</frontend_type>
|
99 |
+
<sort_order>11</sort_order>
|
100 |
+
<show_in_default>1</show_in_default>
|
101 |
+
<show_in_website>1</show_in_website>
|
102 |
+
<show_in_store>1</show_in_store>
|
103 |
+
</cp_enseigne>
|
104 |
+
<ville_enseigne translate="label">
|
105 |
+
<label>Ville de l'expéditeur</label>
|
106 |
+
<frontend_type>text</frontend_type>
|
107 |
+
<sort_order>12</sort_order>
|
108 |
+
<show_in_default>1</show_in_default>
|
109 |
+
<show_in_website>1</show_in_website>
|
110 |
+
<show_in_store>1</show_in_store>
|
111 |
+
</ville_enseigne>
|
112 |
+
<pays_enseigne translate="label">
|
113 |
+
<label>Code Pays de l'expéditeur</label>
|
114 |
+
<comment>FR, BE, etc...</comment>
|
115 |
+
<frontend_type>text</frontend_type>
|
116 |
+
<sort_order>13</sort_order>
|
117 |
+
<show_in_default>1</show_in_default>
|
118 |
+
<show_in_website>1</show_in_website>
|
119 |
+
<show_in_store>1</show_in_store>
|
120 |
+
</pays_enseigne>
|
121 |
+
<tel_enseigne translate="label">
|
122 |
+
<label>Téléphone</label>
|
123 |
+
<frontend_type>text</frontend_type>
|
124 |
+
<sort_order>14</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>1</show_in_store>
|
128 |
+
</tel_enseigne>
|
129 |
+
<mobile_enseigne translate="label">
|
130 |
+
<label>Mobile</label>
|
131 |
+
<comment>Facultatif</comment>
|
132 |
+
<frontend_type>text</frontend_type>
|
133 |
+
<sort_order>15</sort_order>
|
134 |
+
<show_in_default>1</show_in_default>
|
135 |
+
<show_in_website>1</show_in_website>
|
136 |
+
<show_in_store>1</show_in_store>
|
137 |
+
</mobile_enseigne>
|
138 |
+
<mail_enseigne translate="label">
|
139 |
+
<label>E-mail</label>
|
140 |
+
<comment>Facultatif</comment>
|
141 |
+
<frontend_type>text</frontend_type>
|
142 |
+
<sort_order>16</sort_order>
|
143 |
+
<show_in_default>1</show_in_default>
|
144 |
+
<show_in_website>1</show_in_website>
|
145 |
+
<show_in_store>1</show_in_store>
|
146 |
+
</mail_enseigne>
|
147 |
+
<handling_type translate="label">
|
148 |
+
<label>Calculate Handling Fee</label>
|
149 |
+
<frontend_type>select</frontend_type>
|
150 |
+
<source_model>shipping/source_handlingType</source_model>
|
151 |
+
<sort_order>20</sort_order>
|
152 |
+
<show_in_default>1</show_in_default>
|
153 |
+
<show_in_website>1</show_in_website>
|
154 |
+
<show_in_store>0</show_in_store>
|
155 |
+
</handling_type>
|
156 |
+
<handling_fee translate="label">
|
157 |
+
<label>Handling Fee</label>
|
158 |
+
<frontend_type>text</frontend_type>
|
159 |
+
<sort_order>21</sort_order>
|
160 |
+
<show_in_default>1</show_in_default>
|
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>22</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>
|
173 |
+
</import>
|
174 |
+
<export translate="label">
|
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>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>
|
182 |
+
</export>
|
183 |
+
<condition_name translate="label">
|
184 |
+
<label>Condition</label>
|
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>24</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>
|
192 |
+
</condition_name>
|
193 |
+
<sallowspecific translate="label">
|
194 |
+
<label>Ship to applicable countries</label>
|
195 |
+
<frontend_type>select</frontend_type>
|
196 |
+
<sort_order>30</sort_order>
|
197 |
+
<frontend_class>shipping-applicable-country</frontend_class>
|
198 |
+
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
199 |
+
<show_in_default>1</show_in_default>
|
200 |
+
<show_in_website>1</show_in_website>
|
201 |
+
<show_in_store>1</show_in_store>
|
202 |
+
</sallowspecific>
|
203 |
+
<specificcountry translate="label">
|
204 |
+
<label>Ship to Specific countries</label>
|
205 |
+
<frontend_type>multiselect</frontend_type>
|
206 |
+
<sort_order>31</sort_order>
|
207 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
208 |
+
<show_in_default>1</show_in_default>
|
209 |
+
<show_in_website>1</show_in_website>
|
210 |
+
<show_in_store>1</show_in_store>
|
211 |
+
</specificcountry>
|
212 |
+
<showmethod translate="label">
|
213 |
+
<label>Show method if not applicable</label>
|
214 |
+
<frontend_type>select</frontend_type>
|
215 |
+
<sort_order>40</sort_order>
|
216 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
217 |
+
<show_in_default>1</show_in_default>
|
218 |
+
<show_in_website>1</show_in_website>
|
219 |
+
<show_in_store>1</show_in_store>
|
220 |
+
</showmethod>
|
221 |
+
<specificerrmsg translate="label">
|
222 |
+
<label>Displayed Error Message</label>
|
223 |
+
<frontend_type>textarea</frontend_type>
|
224 |
+
<sort_order>41</sort_order>
|
225 |
+
<show_in_default>1</show_in_default>
|
226 |
+
<show_in_website>1</show_in_website>
|
227 |
+
<show_in_store>1</show_in_store>
|
228 |
+
</specificerrmsg>
|
229 |
+
<sort_order translate="label">
|
230 |
+
<label>Sort order</label>
|
231 |
+
<frontend_type>text</frontend_type>
|
232 |
+
<sort_order>100</sort_order>
|
233 |
+
<show_in_default>1</show_in_default>
|
234 |
+
<show_in_website>1</show_in_website>
|
235 |
+
<show_in_store>1</show_in_store>
|
236 |
+
</sort_order>
|
237 |
+
</fields>
|
238 |
+
</pointsrelais>
|
239 |
+
</groups>
|
240 |
+
</carriers>
|
241 |
+
</sections>
|
242 |
</config>
|
app/code/community/MondialRelay/Pointsrelais/sql/pointsrelais_setup/mysql4-update-1.0.4.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
|
4 |
+
$installer->startSetup();
|
5 |
+
$storesData = $installer->getConnection()->fetchAll("
|
6 |
+
SELECT
|
7 |
+
DISTINCT (s.website_id)
|
8 |
+
FROM
|
9 |
+
{$installer->getTable('core/store')} as s,
|
10 |
+
{$this->getTable('mondialrelay_pointsrelais')} as mr
|
11 |
+
WHERE
|
12 |
+
s.website_id NOT IN (SELECT DISTINCT (website_id) FROM {$this->getTable('mondialrelay_pointsrelais')})
|
13 |
+
");
|
14 |
+
|
15 |
+
foreach ($storesData as $storeData) {
|
16 |
+
$websiteId = $storeData['website_id'];
|
17 |
+
$query = "INSERT INTO {$this->getTable('mondialrelay_pointsrelais')} (`website_id`, `dest_country_id`, `dest_region_id`, `dest_zip`, `condition_name`, `condition_value`, `price`, `cost`) VALUES
|
18 |
+
({$websiteId}, 'FR', 0, '', 'package_weight', 0.5000, 4.2000, 4.2000),
|
19 |
+
({$websiteId}, 'FR', 0, '', 'package_weight', 1.0000, 4.2000, 4.2000),
|
20 |
+
({$websiteId}, 'FR', 0, '', 'package_weight', 2.0000, 5.5000, 5.5000),
|
21 |
+
({$websiteId}, 'FR', 0, '', 'package_weight', 3.0000, 6.2000, 6.2000),
|
22 |
+
({$websiteId}, 'FR', 0, '', 'package_weight', 5.0000, 7.5000, 7.5000),
|
23 |
+
({$websiteId}, 'FR', 0, '', 'package_weight', 7.0000, 9.6000, 9.6000),
|
24 |
+
({$websiteId}, 'FR', 0, '', 'package_weight', 10.0000, 11.9500, 11.9500),
|
25 |
+
({$websiteId}, 'FR', 0, '', 'package_weight', 15.0000, 14.3500, 14.3500),
|
26 |
+
({$websiteId}, 'FR', 0, '', 'package_weight', 20.0000, 17.9500, 17.9500),
|
27 |
+
({$websiteId}, 'BE', 0, '', 'package_weight', 0.5000, 4.2000, 4.2000),
|
28 |
+
({$websiteId}, 'BE', 0, '', 'package_weight', 1.0000, 4.8000, 4.8000),
|
29 |
+
({$websiteId}, 'BE', 0, '', 'package_weight', 2.0000, 5.5000, 5.5000),
|
30 |
+
({$websiteId}, 'BE', 0, '', 'package_weight', 3.0000, 6.2000, 6.2000),
|
31 |
+
({$websiteId}, 'BE', 0, '', 'package_weight', 5.0000, 7.5000, 7.5000),
|
32 |
+
({$websiteId}, 'BE', 0, '', 'package_weight', 7.0000, 9.6000, 9.6000),
|
33 |
+
({$websiteId}, 'BE', 0, '', 'package_weight', 10.0000, 11.9500, 11.9500),
|
34 |
+
({$websiteId}, 'BE', 0, '', 'package_weight', 15.0000, 14.3500, 14.3500),
|
35 |
+
({$websiteId}, 'BE', 0, '', 'package_weight', 20.0000, 17.9500, 17.9500);
|
36 |
+
";
|
37 |
+
$installer->run($query);
|
38 |
+
}
|
39 |
+
|
40 |
+
$installer->endSetup();
|
app/design/adminhtml/default/mondialrelay/template/sales/order/shipment/create/form.phtml
DELETED
@@ -1,87 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
-
*
|
21 |
-
* @category design_default
|
22 |
-
* @package Mage
|
23 |
-
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<form id="edit_form" method="post" action="<?php echo $this->getSaveUrl() ?>">
|
28 |
-
<?php echo $this->getBlockHtml('formkey')?>
|
29 |
-
<?php $_order = $this->getShipment()->getOrder() ?>
|
30 |
-
<?php $_shippingMethod = explode("_",$_order->getShippingMethod()); ?>
|
31 |
-
<?php echo $this->getChildHtml('order_info') ?>
|
32 |
-
|
33 |
-
|
34 |
-
<div class="box-left">
|
35 |
-
<!--Billing Address-->
|
36 |
-
<div class="entry-edit">
|
37 |
-
<div class="entry-edit-head">
|
38 |
-
<h4 class="icon-head head-payment-method"><?php echo Mage::helper('sales')->__('Payment Information') ?></h4>
|
39 |
-
</div>
|
40 |
-
<fieldset>
|
41 |
-
<div><?php echo $this->getPaymentHtml() ?></div>
|
42 |
-
<div><?php echo Mage::helper('sales')->__('Order was placed using %s', $_order->getOrderCurrencyCode()) ?></div>
|
43 |
-
</fieldset>
|
44 |
-
</div>
|
45 |
-
</div>
|
46 |
-
<div class="box-right">
|
47 |
-
<!--Shipping Address-->
|
48 |
-
<div class="entry-edit">
|
49 |
-
<div class="entry-edit-head">
|
50 |
-
<h4 class="icon-head head-shipping-method"><?php echo Mage::helper('sales')->__('Shipping Information') ?></h4>
|
51 |
-
</div>
|
52 |
-
<fieldset>
|
53 |
-
<div>
|
54 |
-
<strong><?php echo $_order->getShippingDescription() ?></strong>
|
55 |
-
<?php echo $this->helper('sales')->__('Total Shipping Charges'); ?>:
|
56 |
-
|
57 |
-
<?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
|
58 |
-
<?php $_excl = $this->displayShippingPriceInclTax($_order); ?>
|
59 |
-
<?php else: ?>
|
60 |
-
<?php $_excl = $this->displayPriceAttribute('shipping_amount', false, ' '); ?>
|
61 |
-
<?php endif; ?>
|
62 |
-
<?php $_incl = $this->displayShippingPriceInclTax($_order); ?>
|
63 |
-
|
64 |
-
<?php echo $_excl; ?>
|
65 |
-
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
66 |
-
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
67 |
-
<?php endif; ?>
|
68 |
-
</div>
|
69 |
-
<?php if ($_shippingMethod[0] == 'pointsrelais') : ?>
|
70 |
-
<div><?php echo $this->helper('pointsrelais')->__('Le numéro de tracking sera ajouté automatiquement'); ?></div>
|
71 |
-
<?php else: ?>
|
72 |
-
<div><?php echo $this->getChildHtml('shipment_tracking') ?></div>
|
73 |
-
<?php endif; ?>
|
74 |
-
</fieldset>
|
75 |
-
</div>
|
76 |
-
</div>
|
77 |
-
<div class="clear"></div>
|
78 |
-
|
79 |
-
<div class="entry-edit">
|
80 |
-
<div class="entry-edit-head">
|
81 |
-
<h4 class="icon-head head-products"><?php echo Mage::helper('sales')->__('Items to Ship') ?></h4>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
<div id="ship_items_container">
|
85 |
-
<?php echo $this->getItemsHtml() ?>
|
86 |
-
</div>
|
87 |
-
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/pointsrelais/info.phtml
CHANGED
@@ -4,7 +4,9 @@
|
|
4 |
$detail_pointrelais = $this->getDetailPointRelais();
|
5 |
|
6 |
?>
|
|
|
7 |
<div id="backgroundLighbox" style="height: <?php echo $this->getRequest()->getPost('hauteur') ?>px; width: <?php echo $this->getRequest()->getPost('largeur') ?>px; " ></div>
|
|
|
8 |
<div id="detailsPointRelais"">
|
9 |
<div class="colonne-gauche">
|
10 |
<h1><?php echo $this->__('Votre') ?> <span style="font-weight: bold;"><?php echo $this->__('Point Relais') ?></span></h1>
|
@@ -150,7 +152,14 @@ $detail_pointrelais = $this->getDetailPointRelais();
|
|
150 |
$errors[] = $e->getMessage();
|
151 |
}?>
|
152 |
</table>
|
153 |
-
|
|
|
|
|
|
|
|
|
154 |
</div>
|
155 |
-
|
156 |
-
|
|
|
|
|
|
4 |
$detail_pointrelais = $this->getDetailPointRelais();
|
5 |
|
6 |
?>
|
7 |
+
<?php if ($this->getRequest()->getPost('popup_relais') != 1):?>
|
8 |
<div id="backgroundLighbox" style="height: <?php echo $this->getRequest()->getPost('hauteur') ?>px; width: <?php echo $this->getRequest()->getPost('largeur') ?>px; " ></div>
|
9 |
+
<?php endif;?>
|
10 |
<div id="detailsPointRelais"">
|
11 |
<div class="colonne-gauche">
|
12 |
<h1><?php echo $this->__('Votre') ?> <span style="font-weight: bold;"><?php echo $this->__('Point Relais') ?></span></h1>
|
152 |
$errors[] = $e->getMessage();
|
153 |
}?>
|
154 |
</table>
|
155 |
+
<?php if ($this->getRequest()->getPost('popup_relais') == 1):?>
|
156 |
+
<div class="fermer"><a href="#" onclick="window.close(); return false;">Fermer</a></div>
|
157 |
+
<?php else:?>
|
158 |
+
<div class="fermer"><a href="#" onclick="PointsRelais.fermer(); return false;">Fermer</a></div>
|
159 |
+
<?php endif;?>
|
160 |
</div>
|
161 |
+
|
162 |
+
<?php if ($this->getRequest()->getPost('popup_relais') == 1):?>
|
163 |
+
</body>
|
164 |
+
</html>
|
165 |
+
<?php endif;?>
|
app/etc/modules/MondialRelay_All.xml
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<MondialRelay_Pointsrelais>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>community</codePool>
|
7 |
-
</MondialRelay_Pointsrelais>
|
8 |
-
</modules>
|
9 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/fr_FR/MondialRelay_Pointsrelais.csv
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Point Relais","Point Relais"
|
2 |
+
"Plan d\'acc̬s au magasin","Plan d\'acc̬s au magasin"
|
3 |
+
"Horaires d\'ouverture","Horaires d\'ouverture"
|
4 |
+
"Lundi","Lundi"
|
5 |
+
"Mardi","Mardi"
|
6 |
+
"Mercredi","Mercredi"
|
7 |
+
"Jeudi","Jeudi"
|
8 |
+
"Vendredi","Vendredi"
|
9 |
+
"Samedi","Samedi"
|
10 |
+
"Dimanche","Dimanche"
|
11 |
+
"Fermer","Fermer"
|
12 |
+
"Le num̩ro de tracking sera ajout̩ automatiquement","Le num̩ro de tracking sera ajout̩ automatiquement"
|
13 |
+
"Impressions des ̩tiquettes Mondial Relay","Impressions des ̩tiquettes Mondial Relay"
|
14 |
+
Etiquette Mondial Relay","Etiquette Mondial Relay"
|
15 |
+
"Etiquettes","Etiquettes"
|
16 |
+
"Imprimer","Imprimer"
|
17 |
+
"Imprimer les ̩tiquettes","Imprimer les ̩tiquettes"
|
18 |
+
"D̩sol̩, une erreure est survenu lors de la r̩cup̩ration de l\'̩tiquetes. Merci de contacter Mondial Relay ou de r̩essayer plus tard","D̩sol̩, une erreure est survenu lors de la r̩cup̩ration de l\'̩tiquetes. Merci de contacter Mondial Relay ou de r̩essayer plus tard"
|
package.xml
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MondialRelay_Pointsrelais</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
-
<license uri="http://
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Module de livraison Mondial Relay</summary>
|
10 |
-
<description>
|
11 |
-
<notes>
|
12 |
-
|
13 |
-
<
|
14 |
-
<
|
15 |
-
<
|
|
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MondialRelay_Pointsrelais</name>
|
4 |
+
<version>1.0.4</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>correction de la création d'etiquettes
|
12 |
+
correction de la redirection https</notes>
|
13 |
+
<authors><author><name>cyrille guillaud</name><user>auto-converted</user><email>cguillaud@cg-consulting.fr</email></author></authors>
|
14 |
+
<date>2010-04-01</date>
|
15 |
+
<time>00:40:23</time>
|
16 |
+
<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="0397e023998b05e06539fe9cbc46633a"/></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="913bad19edb072f54a3037fa2a860e5e"/></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="e55ace0129fe156dbeb32a341d384d6a"/></dir></dir><file name="Form.php" hash="3964ae1c690e49d626ed362290fb68a2"/></dir></dir><file name="Info.php" hash="d24bd6bcffe1eae00144d320f595d40d"/></dir><dir name="controllers"><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="562d1105e31f5d6cf100d74e2db1a03a"/></dir><file name="ImpressionController.php" hash="3d4201841e0dfc10f96f5f4a77d5f214"/></dir><dir name="System"><file name="ConfigController.php" hash="495f6d405adf5fba5a32570a56b3770f"/></dir><file name="IndexController.php" hash="0b3068c6075d1ad50f32f802a91bdf38"/></dir><dir name="etc"><file name="config.xml" hash="dd7232db3a8edc0b58cc1b32ef338f1c"/><file name="system.xml" hash="0d3db29ea0b056990b4d990e8351bd29"/></dir><dir name="Helper"><file name="Data.php" hash="e81c10d80df89ecbd51715672c710d3e"/></dir><dir name="Model"><dir name="Carrier"><file name="Pointsrelais.php" hash="0241fa09cb426ecc3c85813646f3dff6"/></dir><dir name="Mysql4"><dir name="Carrier"><dir name="Pointsrelais"><file name="Collection.php" hash="8c7735c2b69a53f234628b8ac0d946cd"/></dir><file name="Pointsrelais.php" hash="c1d5c5f50611d060612ad557111152ce"/></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><file name="Pointsrelais.php" hash="39881a493e895b1921f27b3b144450ee"/></dir></dir><dir name="Source"><dir name="Shipping"><file name="Pointsrelais.php" hash="a75b6978fea52d78b0aabce1401cf9d3"/></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="fa83c2508cd25d29e122f7481ec11735"/><file name="mysql4-uninstall-0.1.0.php" hash="fe48b6326faa98cadaa69b3c54973b10"/><file name="mysql4-update-1.0.4.php" hash="5c2027a8336b10aba6ec8cf4a2e2e9e0"/></dir></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|
skin/frontend/default/default/css/iepointsrelais.css
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
/* Mise en place de la lightbox pour IE6 */
|
2 |
-
|
3 |
-
#backgroundLighbox {
|
4 |
-
position:absolute;
|
5 |
-
}
|
6 |
-
|
7 |
-
#detailsPointRelais {
|
8 |
-
position: absolute;
|
9 |
-
}
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/default/default/images/mondialrelay/Thumbs.db
ADDED
Binary file
|
skin/frontend/default/default/js/pointsrelais.js
CHANGED
@@ -33,22 +33,52 @@ PointsRelais = {
|
|
33 |
|
34 |
var hauteur = document.body.getHeight();
|
35 |
var largeur = document.body.getWidth();
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
$('
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
},
|
53 |
|
54 |
//On ferme la lightbox
|
33 |
|
34 |
var hauteur = document.body.getHeight();
|
35 |
var largeur = document.body.getWidth();
|
36 |
+
var protocol = document.location.protocol || 'http:' ;
|
37 |
+
|
38 |
+
if (protocol != 'http:'){
|
39 |
+
//ouvrir popup
|
40 |
+
if ($('relai_post')){
|
41 |
+
$('Id_Relais').value = Id;
|
42 |
+
$('Pays').value = $('pays').innerHTML;
|
43 |
+
$('hauteur').value = hauteur;
|
44 |
+
$('largeur').value = largeur;
|
45 |
+
} else {
|
46 |
+
var form = new Element('form', { action: this.getUrl(), method: "post", name: "relai_post", id: "relai_post", target: "popup_relais", className: "no-display"});
|
47 |
+
var id_relais = new Element('input', { name: "Id_Relais", value:Id, id: "Id_Relais" });
|
48 |
+
var pays = new Element('input', { name: "Pays", value: $('pays').innerHTML, id: "Pays" });
|
49 |
+
var phauteur = new Element('input', { name: "hauteur", value: hauteur, id: "hauteur" });
|
50 |
+
var plargeur = new Element('input', { name: "largeur", value: largeur, id: "largeur" });
|
51 |
+
var popup_relais = new Element('input', { name: "popup_relais", value: 1, id: "popup_relais" });
|
52 |
+
form.insert(id_relais);
|
53 |
+
form.insert(pays);
|
54 |
+
form.insert(phauteur);
|
55 |
+
form.insert(plargeur);
|
56 |
+
form.insert(popup_relais);
|
57 |
+
document.body.insert(form);
|
58 |
}
|
59 |
+
|
60 |
+
window.open(baseUrl+'blank-page', 'popup_relais',' width=900,height=450,scrollbars=no');
|
61 |
+
the_form = eval(document.forms['relai_post']);
|
62 |
+
the_form.submit();
|
63 |
+
} else {
|
64 |
+
//ouverture div
|
65 |
+
new Ajax.Request( this.getUrl() ,
|
66 |
+
{
|
67 |
+
evalScripts : true,
|
68 |
+
parameters : {Id_Relais: Id, Pays:$('pays').innerHTML, hauteur: hauteur, largeur: largeur},
|
69 |
+
onCreate : function() {
|
70 |
+
document.body.style.cursor = 'wait';
|
71 |
+
PointsRelais.toggleLinkPointer('wait');
|
72 |
+
},
|
73 |
+
onSuccess : function(transport) {
|
74 |
+
document.body.style.cursor = 'default';
|
75 |
+
PointsRelais.toggleLinkPointer('pointer');
|
76 |
+
PointsRelais.toggleSelectElements('hidden');
|
77 |
+
$('PointRelais').update();
|
78 |
+
$('PointRelais').update(transport.responseText);
|
79 |
+
}
|
80 |
+
});
|
81 |
+
}
|
82 |
},
|
83 |
|
84 |
//On ferme la lightbox
|