Version Notes
Compatible 1.6.1.0
Download this release
Release Info
Developer | Berlioz |
Extension | ColiPoste_La_Poste_So_Colissimo |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.8 to 1.1.0
- app/code/community/LaPoste/SoColissimoSimplicite/Helper/Data.php +20 -12
- app/code/community/LaPoste/SoColissimoSimplicite/Model/Carrier/ShippingMethod.php +34 -23
- app/code/community/LaPoste/SoColissimoSimplicite/Model/Observer.php +16 -14
- app/code/community/LaPoste/SoColissimoSimplicite/Model/Transaction.php +49 -27
- app/code/community/LaPoste/SoColissimoSimplicite/etc/config.xml +94 -94
- app/code/community/LaPoste/SoColissimoSimplicite/etc/system.xml +201 -184
- app/design/frontend/default/default/template/socolissimosimplicite/form.phtml +27 -24
- package.xml +9 -6
app/code/community/LaPoste/SoColissimoSimplicite/Helper/Data.php
CHANGED
@@ -26,7 +26,22 @@ class LaPoste_SoColissimoSimplicite_Helper_Data extends Mage_Core_Helper_Abstrac
|
|
26 |
* @var string
|
27 |
*/
|
28 |
const FAILURE_URL = 'socolissimosimplicite/form/failure';
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
/**
|
31 |
* Retourne l'url complète de la page contenant le formulaire à soumettre
|
32 |
* pour l'accès au front de SO Colissimo
|
@@ -44,6 +59,7 @@ class LaPoste_SoColissimoSimplicite_Helper_Data extends Mage_Core_Helper_Abstrac
|
|
44 |
*/
|
45 |
public function getSuccessUrl()
|
46 |
{
|
|
|
47 |
return Mage::getUrl(self::SUCCESS_URL);
|
48 |
}
|
49 |
|
@@ -54,6 +70,7 @@ class LaPoste_SoColissimoSimplicite_Helper_Data extends Mage_Core_Helper_Abstrac
|
|
54 |
*/
|
55 |
public function getFailureUrl()
|
56 |
{
|
|
|
57 |
return Mage::getUrl(self::FAILURE_URL);
|
58 |
}
|
59 |
|
@@ -123,15 +140,6 @@ class LaPoste_SoColissimoSimplicite_Helper_Data extends Mage_Core_Helper_Abstrac
|
|
123 |
return Mage::getStoreConfig('carriers/socolissimosimplicite/redirectmessage');
|
124 |
}
|
125 |
|
126 |
-
/**
|
127 |
-
* Vérifie si la livraison dans les points de retrait est désactivée
|
128 |
-
* @return boolean
|
129 |
-
*/
|
130 |
-
public function isShipOutOfHomeDisabled()
|
131 |
-
{
|
132 |
-
return Mage::getStoreConfig('carriers/socolissimosimplicite/shipoutofhomeenabled') == '0';
|
133 |
-
}
|
134 |
-
|
135 |
/**
|
136 |
* Retourne l'url de vérification de la disponibilité de SO Colissimo Simplicité.
|
137 |
* @return string
|
@@ -169,7 +177,7 @@ class LaPoste_SoColissimoSimplicite_Helper_Data extends Mage_Core_Helper_Abstrac
|
|
169 |
public function getMapPrefix()
|
170 |
{
|
171 |
$map = Mage::getStoreConfig('carriers/socolissimosimplicite/mapprefix');
|
172 |
-
return json_decode($map, true);
|
173 |
}
|
174 |
|
175 |
/**
|
@@ -179,7 +187,7 @@ class LaPoste_SoColissimoSimplicite_Helper_Data extends Mage_Core_Helper_Abstrac
|
|
179 |
* @param int $maxDecimalDigit
|
180 |
* @return float
|
181 |
*/
|
182 |
-
public function getFormatedShippingPrice($shippingPrice
|
183 |
{
|
184 |
$formatedPrice = number_format($shippingPrice, $maxDecimalDigit, '.', '');
|
185 |
return $formatedPrice;
|
@@ -194,7 +202,7 @@ class LaPoste_SoColissimoSimplicite_Helper_Data extends Mage_Core_Helper_Abstrac
|
|
194 |
public function getFormatedWeight($weight)
|
195 |
{
|
196 |
$weight = str_replace(',', '.', $weight);
|
197 |
-
$weight = $weight
|
198 |
$formatedWeight = number_format($weight, 2, '.', '');
|
199 |
return $formatedWeight;
|
200 |
}
|
26 |
* @var string
|
27 |
*/
|
28 |
const FAILURE_URL = 'socolissimosimplicite/form/failure';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Numéro de version à envoyer obligatoirement à la plateforme
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
const NUM_VERSION = '3.0';
|
35 |
|
36 |
+
/**
|
37 |
+
* Retourne le numéro de version à soumettre à la plateforme
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
public function getNumVersion()
|
41 |
+
{
|
42 |
+
return self::NUM_VERSION;
|
43 |
+
}
|
44 |
+
|
45 |
/**
|
46 |
* Retourne l'url complète de la page contenant le formulaire à soumettre
|
47 |
* pour l'accès au front de SO Colissimo
|
59 |
*/
|
60 |
public function getSuccessUrl()
|
61 |
{
|
62 |
+
//return 'http://magento-community-1-6.1.0.vm/index.php/socolissimosimplicite/form/success/';
|
63 |
return Mage::getUrl(self::SUCCESS_URL);
|
64 |
}
|
65 |
|
70 |
*/
|
71 |
public function getFailureUrl()
|
72 |
{
|
73 |
+
//return 'http://magento-community-1-6.1.0.vm/index.php/socolissimosimplicite/form/failure/';
|
74 |
return Mage::getUrl(self::FAILURE_URL);
|
75 |
}
|
76 |
|
140 |
return Mage::getStoreConfig('carriers/socolissimosimplicite/redirectmessage');
|
141 |
}
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
/**
|
144 |
* Retourne l'url de vérification de la disponibilité de SO Colissimo Simplicité.
|
145 |
* @return string
|
177 |
public function getMapPrefix()
|
178 |
{
|
179 |
$map = Mage::getStoreConfig('carriers/socolissimosimplicite/mapprefix');
|
180 |
+
return json_decode($map, true);
|
181 |
}
|
182 |
|
183 |
/**
|
187 |
* @param int $maxDecimalDigit
|
188 |
* @return float
|
189 |
*/
|
190 |
+
public function getFormatedShippingPrice($shippingPrice, $maxDecimalDigit = 2)
|
191 |
{
|
192 |
$formatedPrice = number_format($shippingPrice, $maxDecimalDigit, '.', '');
|
193 |
return $formatedPrice;
|
202 |
public function getFormatedWeight($weight)
|
203 |
{
|
204 |
$weight = str_replace(',', '.', $weight);
|
205 |
+
$weight = $weight * 1000; //converti kg en g
|
206 |
$formatedWeight = number_format($weight, 2, '.', '');
|
207 |
return $formatedWeight;
|
208 |
}
|
app/code/community/LaPoste/SoColissimoSimplicite/Model/Carrier/ShippingMethod.php
CHANGED
@@ -33,32 +33,43 @@ class LaPoste_SoColissimoSimplicite_Model_Carrier_ShippingMethod
|
|
33 |
//on stoppe si le mode de livraison n'est pas activé dans la configuration
|
34 |
if (!$this->getConfigFlag('active')) {
|
35 |
return false;
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
-
$
|
40 |
-
|
41 |
-
$method->setCarrier($this->_code);
|
42 |
-
$method->setCarrierTitle($this->getConfigData('title'));
|
43 |
-
|
44 |
-
$method->setMethod($this->_code);
|
45 |
-
$method->setMethodTitle($this->getConfigData('name'));
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
if ($minQuotePriceForFreeShipping > 0 and $quotePriceWithDiscount >= $minQuotePriceForFreeShipping) {
|
51 |
-
$method->setPrice(0);
|
52 |
-
} else {
|
53 |
-
$method->setPrice($this->getCalculatedPrice());
|
54 |
-
}
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
-
|
61 |
-
$result->append($method);
|
62 |
return $result;
|
63 |
}
|
64 |
|
33 |
//on stoppe si le mode de livraison n'est pas activé dans la configuration
|
34 |
if (!$this->getConfigFlag('active')) {
|
35 |
return false;
|
36 |
+
}
|
37 |
+
|
38 |
+
//idem si la limite de poids ou la tranche de prix ne sont pas respectés
|
39 |
+
$packageValue = $request->getPackageValue();
|
40 |
+
$packageWeight = $request->getPackageWeight();
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
+
$allow = ($this->getConfigData('min_order_total') == '' || $packageValue >= $this->getConfigData('min_order_total'))
|
43 |
+
&& ($this->getConfigData('max_order_total') == '' || $packageValue <= $this->getConfigData('max_order_total'))
|
44 |
+
&& ($this->getConfigData('max_weight') == '' || $packageWeight <= $this->getConfigData('max_weight'));
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
$result = Mage::getModel('shipping/rate_result');
|
47 |
+
|
48 |
+
if ($allow == true) {
|
49 |
+
$method = Mage::getModel('shipping/rate_result_method');
|
50 |
+
|
51 |
+
$method->setCarrier($this->_code);
|
52 |
+
$method->setCarrierTitle($this->getConfigData('title'));
|
53 |
+
|
54 |
+
$method->setMethod($this->_code);
|
55 |
+
$method->setMethodTitle($this->getConfigData('name'));
|
56 |
+
|
57 |
+
// vérifier si la livraison collisimo est offerte et à partir de quel montant
|
58 |
+
$minQuotePriceForFreeShipping = $this->getConfigData('minquotepriceforfree');
|
59 |
+
$quotePriceWithDiscount = $request->getData('package_value_with_discount');
|
60 |
+
if ($minQuotePriceForFreeShipping > 0 and $quotePriceWithDiscount >= $minQuotePriceForFreeShipping) {
|
61 |
+
$method->setPrice(0);
|
62 |
+
} else {
|
63 |
+
$method->setPrice($this->getCalculatedPrice());
|
64 |
+
}
|
65 |
+
|
66 |
+
// vérifier si la livraison collisimo est offerte via une règle de prix
|
67 |
+
if ($request->getFreeShipping()) {
|
68 |
+
$method->setPrice(0);
|
69 |
+
}
|
70 |
+
|
71 |
+
$result->append($method);
|
72 |
}
|
|
|
|
|
73 |
return $result;
|
74 |
}
|
75 |
|
app/code/community/LaPoste/SoColissimoSimplicite/Model/Observer.php
CHANGED
@@ -169,55 +169,57 @@ class LaPoste_SoColissimoSimplicite_Model_Observer
|
|
169 |
foreach ($shippingData as $fieldSoCo => $valueSoCo) {
|
170 |
if (array_key_exists($fieldSoCo, $this->_mapFields)) {
|
171 |
$fieldMagento = $this->_mapFields[$fieldSoCo];
|
172 |
-
|
|
|
173 |
} elseif ($valueSoCo) {
|
|
|
174 |
switch ($fieldSoCo) {
|
175 |
case 'CECIVILITY':
|
176 |
-
$arrayData['prefix'] = $helper->getPrefixForMagento($
|
177 |
break;
|
178 |
|
179 |
//cas particulier des informations de rue, complément d'adresse etc.
|
180 |
|
181 |
//cas livraison à domicile
|
182 |
case 'CEADRESS3':
|
183 |
-
$street['0'] = $
|
184 |
break;
|
185 |
case 'CEADRESS1':
|
186 |
-
$street['1'] = $
|
187 |
break;
|
188 |
case 'CEADRESS2':
|
189 |
-
$street['2'] = $
|
190 |
break;
|
191 |
case 'CEADRESS4':
|
192 |
-
$street['3'] = $
|
193 |
break;
|
194 |
|
195 |
//cas livraison en point relai
|
196 |
case 'PRNAME':
|
197 |
-
$street['0'] = $
|
198 |
break;
|
199 |
case 'PRCOMPLADRESS':
|
200 |
-
$street['1'] = $
|
201 |
break;
|
202 |
case 'PRADRESS1':
|
203 |
-
$street['2'] = $
|
204 |
break;
|
205 |
case 'PRADRESS2':
|
206 |
-
$street['3'] = $
|
207 |
break;
|
208 |
|
209 |
//autres informations sur la livraison
|
210 |
case 'CEENTRYPHONE':
|
211 |
-
$customerNotesArray['0'] = $helper->__('Interphone').' : '.$
|
212 |
break;
|
213 |
case 'CEDOORCODE1':
|
214 |
-
$customerNotesArray['1'] = $helper->__('Code porte').' : '.$
|
215 |
break;
|
216 |
case 'CEDOORCODE2':
|
217 |
-
$customerNotesArray['2'] = $helper->__('Code porte 2').' : '.$
|
218 |
break;
|
219 |
case 'CEDELIVERYINFORMATION':
|
220 |
-
$customerNotesArray['3'] = $
|
221 |
break;
|
222 |
|
223 |
default:
|
169 |
foreach ($shippingData as $fieldSoCo => $valueSoCo) {
|
170 |
if (array_key_exists($fieldSoCo, $this->_mapFields)) {
|
171 |
$fieldMagento = $this->_mapFields[$fieldSoCo];
|
172 |
+
// SoCo renvoie de l'iso8859-1, on encode en utf8
|
173 |
+
$arrayData[$fieldMagento] = utf8_encode($valueSoCo);
|
174 |
} elseif ($valueSoCo) {
|
175 |
+
$shippingValue = utf8_encode($shippingData[$fieldSoCo]);
|
176 |
switch ($fieldSoCo) {
|
177 |
case 'CECIVILITY':
|
178 |
+
$arrayData['prefix'] = $helper->getPrefixForMagento($shippingValue);
|
179 |
break;
|
180 |
|
181 |
//cas particulier des informations de rue, complément d'adresse etc.
|
182 |
|
183 |
//cas livraison à domicile
|
184 |
case 'CEADRESS3':
|
185 |
+
$street['0'] = $shippingValue; //mis en 1er car numéro de rue obligatoire côté SoCo
|
186 |
break;
|
187 |
case 'CEADRESS1':
|
188 |
+
$street['1'] = $shippingValue;
|
189 |
break;
|
190 |
case 'CEADRESS2':
|
191 |
+
$street['2'] = $shippingValue;
|
192 |
break;
|
193 |
case 'CEADRESS4':
|
194 |
+
$street['3'] = $shippingValue;
|
195 |
break;
|
196 |
|
197 |
//cas livraison en point relai
|
198 |
case 'PRNAME':
|
199 |
+
$street['0'] = $shippingValue;
|
200 |
break;
|
201 |
case 'PRCOMPLADRESS':
|
202 |
+
$street['1'] = $shippingValue;
|
203 |
break;
|
204 |
case 'PRADRESS1':
|
205 |
+
$street['2'] = $shippingValue;
|
206 |
break;
|
207 |
case 'PRADRESS2':
|
208 |
+
$street['3'] = $shippingValue;
|
209 |
break;
|
210 |
|
211 |
//autres informations sur la livraison
|
212 |
case 'CEENTRYPHONE':
|
213 |
+
$customerNotesArray['0'] = $helper->__('Interphone').' : '.$shippingValue;
|
214 |
break;
|
215 |
case 'CEDOORCODE1':
|
216 |
+
$customerNotesArray['1'] = $helper->__('Code porte').' : '.$shippingValue;
|
217 |
break;
|
218 |
case 'CEDOORCODE2':
|
219 |
+
$customerNotesArray['2'] = $helper->__('Code porte 2').' : '.$shippingValue;
|
220 |
break;
|
221 |
case 'CEDELIVERYINFORMATION':
|
222 |
+
$customerNotesArray['3'] = $shippingValue;
|
223 |
break;
|
224 |
|
225 |
default:
|
app/code/community/LaPoste/SoColissimoSimplicite/Model/Transaction.php
CHANGED
@@ -82,21 +82,8 @@ class LaPoste_SoColissimoSimplicite_Model_Transaction extends Mage_Core_Model_Ab
|
|
82 |
* autorisé. L’internaute sera redirigé vers l'url retour Echec. Un code erreur sera
|
83 |
* transmis.
|
84 |
*
|
85 |
-
* Il s’agit d’appliquer l’algorithme SHA sur la concaténation des champs
|
86 |
-
*
|
87 |
-
* ---------------------------------+---------------------+-------------
|
88 |
-
* Identifiant | FO pudoFOId | Oui
|
89 |
-
* Nom du destinataire | ceName | Non
|
90 |
-
* Délai de préparation de commande | dyPreparationTime | Non
|
91 |
-
* Frais d’expédition | dyForwardingCharges | Oui
|
92 |
-
* N° client web | trClientNumber | Non
|
93 |
-
* N° commande | trOrderNumber | Non
|
94 |
-
* N° transaction | orderId | Oui
|
95 |
-
*
|
96 |
-
* La clé SHA doit être également concaténée à la fin de la chaîne :
|
97 |
-
* Chaîne_à_convertir= pudoFOId+ceName+ dyPreparationTime+
|
98 |
-
* dyForwardingCharges+ trClientNumber+ trOrderNumber+ orderId+cléSHA
|
99 |
-
* Signature=SHA1(Chaîne_à_convertir)
|
100 |
*
|
101 |
* Certains des champs ci-dessus ne sont pas obligatoires. S’ils ne sont pas transmis
|
102 |
* par le site web, ils ne doivent pas être pris en compte dans le calcul de la
|
@@ -113,19 +100,54 @@ class LaPoste_SoColissimoSimplicite_Model_Transaction extends Mage_Core_Model_Ab
|
|
113 |
{
|
114 |
$stringToConvert = '';
|
115 |
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
$
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
|
|
129 |
return sha1($stringToConvert);
|
130 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
82 |
* autorisé. L’internaute sera redirigé vers l'url retour Echec. Un code erreur sera
|
83 |
* transmis.
|
84 |
*
|
85 |
+
* Il s’agit d’appliquer l’algorithme SHA sur la concaténation des champs inclus dans
|
86 |
+
* le tableau $data. La clé SHA doit être également concaténée à la fin de la chaîne.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
*
|
88 |
* Certains des champs ci-dessus ne sont pas obligatoires. S’ils ne sont pas transmis
|
89 |
* par le site web, ils ne doivent pas être pris en compte dans le calcul de la
|
100 |
{
|
101 |
$stringToConvert = '';
|
102 |
|
103 |
+
$shippingPrice = ($shippingAddress->getFreeShipping() === '1') ? 0 : $shippingAddress->getShippingAmount();
|
104 |
+
$data = array(
|
105 |
+
'pudoFOId'=>$this->helper()->getAccountId(),
|
106 |
+
'ceName'=>$shippingAddress->getLastname(),
|
107 |
+
'dyForwardingCharges'=>$this->helper()->getFormatedShippingPrice($shippingPrice),
|
108 |
+
'trClientNumber'=>$shippingAddress->getCustomerId(),
|
109 |
+
'trOrderNumber'=>$shippingAddress->getQuoteId(),
|
110 |
+
'orderId'=>$this->getId(),
|
111 |
+
'numVersion'=>$this->helper()->getNumVersion(),
|
112 |
+
'ceCivility'=>$this->helper()->getPrefixForSoColissimo($shippingAddress->getPrefix()),
|
113 |
+
'ceFirstName'=>$shippingAddress->getFirstname(),
|
114 |
+
'ceCompanyName'=>$shippingAddress->getCompany(),
|
115 |
+
'ceAdress1'=>$this->getShippingAddressStreet($shippingAddress, 2),
|
116 |
+
'ceAdress2'=>$this->getShippingAddressStreet($shippingAddress, 3),
|
117 |
+
'ceAdress3'=>$this->getShippingAddressStreet($shippingAddress, 1),
|
118 |
+
'ceAdress4'=>$this->getShippingAddressStreet($shippingAddress, 4),
|
119 |
+
'ceZipCode'=>$shippingAddress->getPostcode(),
|
120 |
+
'ceTown'=>$shippingAddress->getCity(),
|
121 |
+
'ceEmail'=>$shippingAddress->getEmail(),
|
122 |
+
'cePhoneNumber'=>$shippingAddress->getTelephone(),
|
123 |
+
'dyWeight'=>$this->helper()->getFormatedWeight($shippingAddress->getWeight()),
|
124 |
+
'trReturnUrlKo'=>$this->helper()->getFailureUrl(),
|
125 |
+
'trReturnUrlOk'=>$this->helper()->getSuccessUrl(),
|
126 |
+
'encryptionKey'=>$this->helper()->getEncryptionKey(),
|
127 |
+
);
|
128 |
+
|
129 |
+
foreach ($data as $field=>$value) {
|
130 |
+
if (!empty($value)) {
|
131 |
+
$stringToConvert .= utf8_decode($value);
|
132 |
+
}
|
133 |
}
|
134 |
+
|
135 |
return sha1($stringToConvert);
|
136 |
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Retourne la ligne n° $line des informations (rue, étage, immeuble, etc.) de l'adresse
|
140 |
+
* de livraison de la commande en cours.
|
141 |
+
* @param int $line
|
142 |
+
* @return string
|
143 |
+
*/
|
144 |
+
public function getShippingAddressStreet($shippingAddress, $line = 1)
|
145 |
+
{
|
146 |
+
$arrayStreet = $shippingAddress->getStreet();
|
147 |
+
$streetLine = '';
|
148 |
+
if (0 < $line && $line <= count($arrayStreet)) {
|
149 |
+
$streetLine = $arrayStreet[$line-1];
|
150 |
+
}
|
151 |
+
return $streetLine;
|
152 |
+
}
|
153 |
}
|
app/code/community/LaPoste/SoColissimoSimplicite/etc/config.xml
CHANGED
@@ -6,69 +6,69 @@
|
|
6 |
* @category LaPoste
|
7 |
* @package LaPoste_SoColissimoSimplicite
|
8 |
* @copyright Copyright (c) 2010 La Poste
|
9 |
-
* @author
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
-->
|
13 |
<config>
|
14 |
<modules>
|
15 |
<LaPoste_SoColissimoSimplicite>
|
16 |
-
<version>1.0
|
17 |
</LaPoste_SoColissimoSimplicite>
|
18 |
</modules>
|
19 |
|
20 |
<global>
|
21 |
-
|
22 |
<socolissimosimplicite><class>LaPoste_SoColissimoSimplicite_Block</class></socolissimosimplicite>
|
23 |
</blocks>
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
<socolissimosimplicite>
|
43 |
<class>LaPoste_SoColissimoSimplicite_Helper</class>
|
44 |
</socolissimosimplicite>
|
45 |
</helpers>
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
<use>core_read</use>
|
61 |
</connection>
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
<use>core_write</use>
|
67 |
</connection>
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
<modules>
|
73 |
<LaPoste_SoColissimoSimplicite>
|
74 |
<files>
|
@@ -87,7 +87,7 @@
|
|
87 |
</global>
|
88 |
|
89 |
<frontend>
|
90 |
-
|
91 |
<updates>
|
92 |
<socolissimosimplicite module="LaPoste_SoColissimoSimplicite">
|
93 |
<file>socolissimosimplicite.xml</file>
|
@@ -105,65 +105,65 @@
|
|
105 |
</socolissimosimplicite>
|
106 |
</routers>
|
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 |
</frontend>
|
138 |
|
139 |
<default>
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
<active_service_is_available>1</active_service_is_available>
|
152 |
<url_service_is_available>http://ws.colissimo.fr/supervision-pudo/supervision.jsp</url_service_is_available>
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
|
|
159 |
{
|
160 |
"MR":"M."
|
161 |
,"MLE":"Mlle"
|
162 |
,"MME":"Mme"
|
163 |
}
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
</default>
|
169 |
</config>
|
6 |
* @category LaPoste
|
7 |
* @package LaPoste_SoColissimoSimplicite
|
8 |
* @copyright Copyright (c) 2010 La Poste
|
9 |
+
* @author Smile (http://www.smile.fr)
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
-->
|
13 |
<config>
|
14 |
<modules>
|
15 |
<LaPoste_SoColissimoSimplicite>
|
16 |
+
<version>1.1.0</version>
|
17 |
</LaPoste_SoColissimoSimplicite>
|
18 |
</modules>
|
19 |
|
20 |
<global>
|
21 |
+
<blocks>
|
22 |
<socolissimosimplicite><class>LaPoste_SoColissimoSimplicite_Block</class></socolissimosimplicite>
|
23 |
</blocks>
|
24 |
|
25 |
+
<models>
|
26 |
+
<socolissimosimplicite>
|
27 |
+
<class>LaPoste_SoColissimoSimplicite_Model</class>
|
28 |
+
<resourceModel>socolissimosimplicite_mysql4</resourceModel>
|
29 |
+
</socolissimosimplicite>
|
30 |
+
|
31 |
+
<socolissimosimplicite_mysql4>
|
32 |
+
<class>LaPoste_SoColissimoSimplicite_Model_Mysql4</class>
|
33 |
+
<entities>
|
34 |
+
<transaction>
|
35 |
+
<table>laposte_socolissimosimplicite_transaction</table>
|
36 |
+
</transaction>
|
37 |
+
</entities>
|
38 |
+
</socolissimosimplicite_mysql4>
|
39 |
+
</models>
|
40 |
+
|
41 |
+
<helpers>
|
42 |
<socolissimosimplicite>
|
43 |
<class>LaPoste_SoColissimoSimplicite_Helper</class>
|
44 |
</socolissimosimplicite>
|
45 |
</helpers>
|
46 |
+
|
47 |
+
<resources>
|
48 |
+
<socolissimosimplicite_setup>
|
49 |
+
<setup>
|
50 |
+
<module>LaPoste_SoColissimoSimplicite</module>
|
51 |
+
<class>Mage_Sales_Model_Mysql4_Setup</class>
|
52 |
+
</setup>
|
53 |
+
<connection>
|
54 |
+
<use>core_setup</use>
|
55 |
+
</connection>
|
56 |
+
</socolissimosimplicite_setup>
|
57 |
+
|
58 |
+
<socolissimosimplicite_read>
|
59 |
+
<connection>
|
60 |
<use>core_read</use>
|
61 |
</connection>
|
62 |
+
</socolissimosimplicite_read>
|
63 |
+
|
64 |
+
<socolissimosimplicite_write>
|
65 |
+
<connection>
|
66 |
<use>core_write</use>
|
67 |
</connection>
|
68 |
+
</socolissimosimplicite_write>
|
69 |
+
</resources>
|
70 |
+
|
71 |
+
<translate>
|
72 |
<modules>
|
73 |
<LaPoste_SoColissimoSimplicite>
|
74 |
<files>
|
87 |
</global>
|
88 |
|
89 |
<frontend>
|
90 |
+
<layout>
|
91 |
<updates>
|
92 |
<socolissimosimplicite module="LaPoste_SoColissimoSimplicite">
|
93 |
<file>socolissimosimplicite.xml</file>
|
105 |
</socolissimosimplicite>
|
106 |
</routers>
|
107 |
|
108 |
+
<events>
|
109 |
+
<controller_action_layout_load_before>
|
110 |
+
<observers>
|
111 |
+
<laposte_socolissimosimplicite_observer>
|
112 |
+
<type>singleton</type>
|
113 |
+
<class>socolissimosimplicite/observer</class>
|
114 |
+
<method>setShippingAddressWithSoColissimoAddress</method>
|
115 |
+
</laposte_socolissimosimplicite_observer>
|
116 |
+
</observers>
|
117 |
+
</controller_action_layout_load_before>
|
118 |
+
<checkout_onepage_controller_success_action>
|
119 |
+
<observers>
|
120 |
+
<laposte_socolissimosimplicite_observer>
|
121 |
+
<type>singleton</type>
|
122 |
+
<class>socolissimosimplicite/observer</class>
|
123 |
+
<method>clearCheckoutSession</method>
|
124 |
+
</laposte_socolissimosimplicite_observer>
|
125 |
+
</observers>
|
126 |
+
</checkout_onepage_controller_success_action>
|
127 |
+
<checkout_type_onepage_save_order>
|
128 |
+
<observers>
|
129 |
+
<laposte_socolissimosimplicite_observer>
|
130 |
+
<type>singleton</type>
|
131 |
+
<class>socolissimosimplicite/observer</class>
|
132 |
+
<method>addSocoAttributesToOrder</method>
|
133 |
+
</laposte_socolissimosimplicite_observer>
|
134 |
+
</observers>
|
135 |
+
</checkout_type_onepage_save_order>
|
136 |
+
</events>
|
137 |
</frontend>
|
138 |
|
139 |
<default>
|
140 |
+
<carriers>
|
141 |
+
<socolissimosimplicite>
|
142 |
+
<active>0</active>
|
143 |
+
<title>La Poste</title>
|
144 |
+
<name>So Colissimo</name>
|
145 |
+
<selectmessage>En cliquant sur Poursuivre, vous serez redirigé(e) vers la page So Colissimo afin de choisir votre mode de livraison.</selectmessage>
|
146 |
+
<redirectmessage>Vous allez être redirigé(e) vers So Colissimo dans un instant...</redirectmessage>
|
147 |
+
<account></account>
|
148 |
+
<encryption_key></encryption_key>
|
149 |
+
<url_fo>http://ws.colissimo.fr/pudo-fo/storeCall.do</url_fo>
|
150 |
+
<active_service_is_available>1</active_service_is_available>
|
|
|
151 |
<url_service_is_available>http://ws.colissimo.fr/supervision-pudo/supervision.jsp</url_service_is_available>
|
152 |
+
<not_available_message>La plateforme technique So Colissimo est temporairement indisponible. Votre commande sera livrée à l'adresse de livraison que vous venez d'indiquer.</not_available_message>
|
153 |
+
<max_weight>30</max_weight>
|
154 |
+
<specificcountry>FR</specificcountry>
|
155 |
+
<sallowspecific>1</sallowspecific>
|
156 |
+
<model>LaPoste_SoColissimoSimplicite_Model_Carrier_ShippingMethod</model>
|
157 |
+
<mapprefix>
|
158 |
+
<![CDATA[
|
159 |
{
|
160 |
"MR":"M."
|
161 |
,"MLE":"Mlle"
|
162 |
,"MME":"Mme"
|
163 |
}
|
164 |
+
]]>
|
165 |
+
</mapprefix>
|
166 |
+
</socolissimosimplicite>
|
167 |
+
</carriers>
|
168 |
</default>
|
169 |
</config>
|
app/code/community/LaPoste/SoColissimoSimplicite/etc/system.xml
CHANGED
@@ -6,192 +6,209 @@
|
|
6 |
* @category LaPoste
|
7 |
* @package LaPoste_SoColissimoSimplicite
|
8 |
* @copyright Copyright (c) 2010 La Poste
|
9 |
-
* @author
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
-->
|
13 |
<config>
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
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 |
-
|
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 |
-
|
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 |
</config>
|
6 |
* @category LaPoste
|
7 |
* @package LaPoste_SoColissimoSimplicite
|
8 |
* @copyright Copyright (c) 2010 La Poste
|
9 |
+
* @author Smile (http://www.smile.fr)
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
-->
|
13 |
<config>
|
14 |
+
<sections>
|
15 |
+
<carriers>
|
16 |
+
<groups>
|
17 |
+
<socolissimosimplicite>
|
18 |
+
<label>So Colissimo</label>
|
19 |
+
<frontend_type>text</frontend_type>
|
20 |
+
<sort_order>100</sort_order>
|
21 |
+
<show_in_default>1</show_in_default>
|
22 |
+
<show_in_website>1</show_in_website>
|
23 |
+
<show_in_store>1</show_in_store>
|
24 |
+
<fields>
|
25 |
+
<active translate="label">
|
26 |
+
<label>Activé</label>
|
27 |
+
<frontend_type>select</frontend_type>
|
28 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
29 |
+
<sort_order>10</sort_order>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>1</show_in_website>
|
32 |
+
<show_in_store>1</show_in_store>
|
33 |
+
</active>
|
34 |
+
<title translate="label">
|
35 |
+
<label>Nom du transporteur</label>
|
36 |
+
<sort_order>20</sort_order>
|
37 |
+
<show_in_default>1</show_in_default>
|
38 |
+
<show_in_website>1</show_in_website>
|
39 |
+
<show_in_store>1</show_in_store>
|
40 |
+
</title>
|
41 |
+
<name translate="label">
|
42 |
+
<label>Nom du mode de livraison</label>
|
43 |
+
<sort_order>30</sort_order>
|
44 |
+
<show_in_default>1</show_in_default>
|
45 |
+
<show_in_website>1</show_in_website>
|
46 |
+
<show_in_store>1</show_in_store>
|
47 |
+
</name>
|
48 |
+
<selectmessage translate="label">
|
49 |
+
<label>Message lors de la sélection du mode de livraison</label>
|
50 |
+
<frontend_type>textarea</frontend_type>
|
51 |
+
<sort_order>31</sort_order>
|
52 |
+
<show_in_default>1</show_in_default>
|
53 |
+
<show_in_website>1</show_in_website>
|
54 |
+
<show_in_store>1</show_in_store>
|
55 |
+
</selectmessage>
|
56 |
+
<redirectmessage translate="label">
|
57 |
+
<label>Message lors de la redirection vers So Colissimo</label>
|
58 |
+
<frontend_type>textarea</frontend_type>
|
59 |
+
<sort_order>32</sort_order>
|
60 |
+
<show_in_default>1</show_in_default>
|
61 |
+
<show_in_website>1</show_in_website>
|
62 |
+
<show_in_store>1</show_in_store>
|
63 |
+
</redirectmessage>
|
64 |
+
<account translate="label">
|
65 |
+
<label>Identifiant FO</label>
|
66 |
+
<sort_order>40</sort_order>
|
67 |
+
<show_in_default>1</show_in_default>
|
68 |
+
<show_in_website>1</show_in_website>
|
69 |
+
<show_in_store>1</show_in_store>
|
70 |
+
</account>
|
71 |
+
<encryption_key translate="label">
|
72 |
+
<label>Clé de cryptage</label>
|
73 |
+
<frontend_type>text</frontend_type>
|
74 |
+
<sort_order>50</sort_order>
|
75 |
+
<show_in_default>1</show_in_default>
|
76 |
+
<show_in_website>1</show_in_website>
|
77 |
+
<show_in_store>1</show_in_store>
|
78 |
+
</encryption_key>
|
79 |
+
<url_fo translate="label">
|
80 |
+
<label>URL de passerelle</label>
|
81 |
+
<sort_order>60</sort_order>
|
82 |
+
<show_in_default>1</show_in_default>
|
83 |
+
<show_in_website>1</show_in_website>
|
84 |
+
<show_in_store>1</show_in_store>
|
85 |
+
</url_fo>
|
86 |
+
<active_service_is_available
|
87 |
+
translate="label">
|
88 |
+
<label>Activer la vérification de la disponibilité</label>
|
89 |
+
<frontend_type>select</frontend_type>
|
90 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
91 |
+
<sort_order>61</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 |
+
</active_service_is_available>
|
96 |
+
<url_service_is_available translate="label">
|
97 |
+
<label>URL de vérification de la disponibilité</label>
|
98 |
+
<sort_order>62</sort_order>
|
99 |
+
<show_in_default>1</show_in_default>
|
100 |
+
<show_in_website>1</show_in_website>
|
101 |
+
<show_in_store>1</show_in_store>
|
102 |
+
</url_service_is_available>
|
103 |
+
<not_available_message translate="label">
|
104 |
+
<label>Message en cas d'indisponibilité de la plateforme</label>
|
105 |
+
<frontend_type>textarea</frontend_type>
|
106 |
+
<sort_order>63</sort_order>
|
107 |
+
<show_in_default>1</show_in_default>
|
108 |
+
<show_in_website>1</show_in_website>
|
109 |
+
<show_in_store>1</show_in_store>
|
110 |
+
</not_available_message>
|
111 |
+
<amountbasetype translate="label">
|
112 |
+
<label>Type des frais de livraison</label>
|
113 |
+
<frontend_type>select</frontend_type>
|
114 |
+
<source_model>socolissimosimplicite/system_config_source_shipping_amountbasetype
|
115 |
+
</source_model>
|
116 |
+
<sort_order>70</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 |
+
</amountbasetype>
|
121 |
+
<amountcalculation translate="label">
|
122 |
+
<label>Calcul des frais de livraison</label>
|
123 |
+
<frontend_type>textarea</frontend_type>
|
124 |
+
<sort_order>80</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 |
+
<comment>
|
129 |
+
<![CDATA[
|
130 |
+
Si <strong>tarif unique</strong>, indiquer le montant (sans devise) ;<br />
|
131 |
+
Si <strong>tarif selon le poids</strong>,
|
132 |
+
indiquer :<br />
|
133 |
+
<code>{"</code>poids en kg<code>":"</code>tarif1<code>","</code>poids en kg<code>":"</code>tarif2<code>",</code>...<code>}</code><br />
|
134 |
+
Le tarif est appliqué pour un poids supérieur ou égal au poids correspondant.<br />
|
135 |
+
Exemple de conditions tarifaires selon le poids : <pre>{"0":"2.90","0.5":"4.50","5":"8","10":"14"}</pre>
|
136 |
+
Si <strong>tarif selon le sous-total du panier</strong>,
|
137 |
+
indiquer :<br />
|
138 |
+
<code>{"</code>montant<code>":"</code>tarif1<code>","</code>montant<code>":"</code>tarif2<code>",</code>...<code>}</code><br />
|
139 |
+
Le tarif est appliqué pour un montant supérieur ou égal au montant correspondant.<br />
|
140 |
+
Exemple de conditions tarifaires selon le montant : <pre>{"0":"3","50":"5","100":"8","250":"0"}</pre>
|
141 |
+
]]>
|
142 |
+
</comment>
|
143 |
+
</amountcalculation>
|
144 |
+
<minquotepriceforfree translate="label">
|
145 |
+
<label>Livraison offerte à partir de (en €)</label>
|
146 |
+
<sort_order>90</sort_order>
|
147 |
+
<show_in_default>1</show_in_default>
|
148 |
+
<show_in_website>1</show_in_website>
|
149 |
+
<show_in_store>1</show_in_store>
|
150 |
+
<comment>Laisser vide pour ne pas offrir les frais de livraison
|
151 |
+
</comment>
|
152 |
+
</minquotepriceforfree>
|
153 |
+
<max_weight translate="label">
|
154 |
+
<label>Limite de poids</label>
|
155 |
+
<sort_order>95</sort_order>
|
156 |
+
<show_in_default>1</show_in_default>
|
157 |
+
<show_in_website>1</show_in_website>
|
158 |
+
<show_in_store>1</show_in_store>
|
159 |
+
<comment>So Colissimo ne sera pas proposé si le poids dépasse le montant saisi
|
160 |
+
</comment>
|
161 |
+
</max_weight>
|
162 |
+
<min_order_total translate="label">
|
163 |
+
<label>Minimum Order Total</label>
|
164 |
+
<frontend_type>text</frontend_type>
|
165 |
+
<sort_order>97</sort_order>
|
166 |
+
<show_in_default>1</show_in_default>
|
167 |
+
<show_in_website>1</show_in_website>
|
168 |
+
<show_in_store>1</show_in_store>
|
169 |
+
</min_order_total>
|
170 |
+
<max_order_total translate="label">
|
171 |
+
<label>Maximum Order Total</label>
|
172 |
+
<frontend_type>text</frontend_type>
|
173 |
+
<sort_order>99</sort_order>
|
174 |
+
<show_in_default>1</show_in_default>
|
175 |
+
<show_in_website>1</show_in_website>
|
176 |
+
<show_in_store>1</show_in_store>
|
177 |
+
</max_order_total>
|
178 |
+
<sort_order translate="label">
|
179 |
+
<label>Sort Order</label>
|
180 |
+
<frontend_type>text</frontend_type>
|
181 |
+
<sort_order>200</sort_order>
|
182 |
+
<show_in_default>1</show_in_default>
|
183 |
+
<show_in_website>1</show_in_website>
|
184 |
+
<show_in_store>0</show_in_store>
|
185 |
+
</sort_order>
|
186 |
+
<sallowspecific translate="label">
|
187 |
+
<label>Ship to Applicable Countries</label>
|
188 |
+
<frontend_type>select</frontend_type>
|
189 |
+
<sort_order>190</sort_order>
|
190 |
+
<frontend_class>shipping-applicable-country</frontend_class>
|
191 |
+
<source_model>adminhtml/system_config_source_shipping_allspecificcountries
|
192 |
+
</source_model>
|
193 |
+
<show_in_default>1</show_in_default>
|
194 |
+
<show_in_website>1</show_in_website>
|
195 |
+
<show_in_store>0</show_in_store>
|
196 |
+
</sallowspecific>
|
197 |
+
<specificcountry translate="label">
|
198 |
+
<label>Ship to Specific Countries</label>
|
199 |
+
<frontend_type>multiselect</frontend_type>
|
200 |
+
<sort_order>191</sort_order>
|
201 |
+
<source_model>adminhtml/system_config_source_country
|
202 |
+
</source_model>
|
203 |
+
<show_in_default>1</show_in_default>
|
204 |
+
<show_in_website>1</show_in_website>
|
205 |
+
<show_in_store>0</show_in_store>
|
206 |
+
<can_be_empty>1</can_be_empty>
|
207 |
+
</specificcountry>
|
208 |
+
|
209 |
+
</fields>
|
210 |
+
</socolissimosimplicite>
|
211 |
+
</groups>
|
212 |
+
</carriers>
|
213 |
+
</sections>
|
214 |
</config>
|
app/design/frontend/default/default/template/socolissimosimplicite/form.phtml
CHANGED
@@ -14,78 +14,81 @@ $_address = $this->getShippingAddress();
|
|
14 |
$_helper = $this->helper('socolissimosimplicite');
|
15 |
?>
|
16 |
|
|
|
|
|
|
|
17 |
<?php if($this->getRedirectMessage()): ?>
|
18 |
-
<h3><?php echo $this->getRedirectMessage(); ?></h3>
|
19 |
<?php endif;?>
|
20 |
-
<form name="socolissimosimpliciteform" action="<?php echo $this->getUrlFoWithReturnUrlKo(); ?>" method="post">
|
21 |
|
22 |
-
<input type="hidden" name="pudoFOId" value="<?php echo $this->getAccountID(); ?>" />
|
23 |
|
24 |
<?php if ($_address->getPrefix()):?>
|
25 |
-
<input type="hidden" name="ceCivility" value="<?php echo $_helper->getPrefixForSoColissimo($_address->getPrefix()); ?>" />
|
26 |
<?php endif;?>
|
27 |
|
28 |
<?php if ($_address->getLastname()):?>
|
29 |
-
<input type="hidden" name="ceName" value="<?php echo $_address->getLastname(); ?>" />
|
30 |
<?php endif;?>
|
31 |
|
32 |
<?php if ($_address->getFirstname()):?>
|
33 |
-
<input type="hidden" name="ceFirstName" value="<?php echo $_address->getFirstname(); ?>" />
|
34 |
<?php endif;?>
|
35 |
|
36 |
<?php if ($_address->getCompany()):?>
|
37 |
-
<input type="hidden" name="ceCompanyName" value="<?php echo $_address->getCompany(); ?>" />
|
38 |
<?php endif;?>
|
39 |
|
40 |
<?php if ($this->getShippingAddressStreet(1)): //1ère ligne de l'adresse dans Magento = 3ème champ adresse dans SoCo ?>
|
41 |
-
<input type="hidden" name="ceAdress3" value="<?php echo $this->getShippingAddressStreet(1); ?>" />
|
42 |
<?php endif;?>
|
43 |
|
44 |
<?php if ($this->getShippingAddressStreet(2)):?>
|
45 |
-
<input type="hidden" name="ceAdress1" value="<?php echo $this->getShippingAddressStreet(2); ?>" />
|
46 |
<?php endif;?>
|
47 |
|
48 |
<?php if ($this->getShippingAddressStreet(3)):?>
|
49 |
-
<input type="hidden" name="ceAdress2" value="<?php echo $this->getShippingAddressStreet(3); ?>" />
|
50 |
<?php endif;?>
|
51 |
|
52 |
<?php if ($this->getShippingAddressStreet(4)):?>
|
53 |
-
<input type="hidden" name="ceAdress4" value="<?php echo $this->getShippingAddressStreet(4); ?>" />
|
54 |
<?php endif;?>
|
55 |
|
56 |
<?php if ($_address->getPostcode()):?>
|
57 |
-
<input type="hidden" name="ceZipCode" value="<?php echo $_address->getPostcode(); ?>" />
|
58 |
<?php endif;?>
|
59 |
|
60 |
<?php if ($_address->getCity()):?>
|
61 |
-
<input type="hidden" name="ceTown" value="<?php echo $_address->getCity(); ?>" />
|
62 |
<?php endif;?>
|
63 |
|
64 |
<?php if ($_address->getEmail()):?>
|
65 |
-
<input type="hidden" name="ceEmail" value="<?php echo $_address->getEmail(); ?>" />
|
66 |
<?php endif;?>
|
67 |
|
68 |
<?php if ($_address->getTelephone()):?>
|
69 |
-
<input type="hidden" name="cePhoneNumber" value="<?php echo $_address->getTelephone(); ?>" />
|
70 |
<?php endif;?>
|
71 |
|
72 |
<?php if ($_address->getWeight()):?>
|
73 |
-
<input type="hidden" name="dyWeight" value="<?php echo $_helper->getFormatedWeight($_address->getWeight()); ?>" />
|
74 |
<?php endif;?>
|
75 |
|
76 |
<?php // suits with free shipping which can be set up by cart rules ?>
|
77 |
-
<?php $forwardingCharges = ($_address->getFreeShipping() === '1')? 0 : $_address->getShippingAmount(); ?>
|
78 |
-
<input type="hidden" name="dyForwardingCharges" value="<?php echo $_helper->getFormatedShippingPrice($forwardingCharges); ?>" />
|
79 |
|
80 |
<?php if ($_address->getCustomerId()):?>
|
81 |
-
<input type="hidden" name="trClientNumber" value="<?php echo $_address->getCustomerId(); ?>" />
|
82 |
<?php endif;?>
|
83 |
|
84 |
<?php if ($_address->getQuoteId()):?>
|
85 |
-
<input type="hidden" name="trOrderNumber" value="<?php echo $_address->getQuoteId(); ?>" />
|
86 |
<?php endif;?>
|
87 |
|
88 |
-
<input type="hidden" name="
|
89 |
|
90 |
<?php
|
91 |
/* donnée spécifique transmis au service, non interprétée par celui-ci et retournée
|
@@ -94,11 +97,11 @@ $_helper = $this->helper('socolissimosimplicite');
|
|
94 |
*/
|
95 |
?>
|
96 |
|
97 |
-
<input type="hidden" name="trReturnUrlOk" value="<?php echo $_helper->getSuccessUrl(); ?>" />
|
98 |
|
99 |
-
<input type="hidden" name="orderId" value="<?php echo $this->getTransaction()->getId(); ?>" />
|
100 |
|
101 |
-
<input type="hidden" name="signature" value="<?php echo $this->getTransaction()->getSignature(); ?>" />
|
102 |
</form>
|
103 |
|
104 |
<script type="text/javascript">
|
14 |
$_helper = $this->helper('socolissimosimplicite');
|
15 |
?>
|
16 |
|
17 |
+
<?php // header au format ISO , So Colissimo ne gèrant pas l'UTF-8 ?>
|
18 |
+
<?php Mage::app()->getResponse()->setHeader("Content-Type", "text/html; charset=ISO-8859-1",true); ?>
|
19 |
+
|
20 |
<?php if($this->getRedirectMessage()): ?>
|
21 |
+
<h3><?php echo utf8_decode($this->getRedirectMessage()); ?></h3>
|
22 |
<?php endif;?>
|
23 |
+
<form name="socolissimosimpliciteform" action="<?php echo utf8_decode($this->getUrlFoWithReturnUrlKo()); ?>" method="post">
|
24 |
|
25 |
+
<input type="hidden" name="pudoFOId" value="<?php echo utf8_decode($this->getAccountID()); ?>" />
|
26 |
|
27 |
<?php if ($_address->getPrefix()):?>
|
28 |
+
<input type="hidden" name="ceCivility" value="<?php echo utf8_decode($_helper->getPrefixForSoColissimo($_address->getPrefix())); ?>" />
|
29 |
<?php endif;?>
|
30 |
|
31 |
<?php if ($_address->getLastname()):?>
|
32 |
+
<input type="hidden" name="ceName" value="<?php echo utf8_decode($_address->getLastname()); ?>" />
|
33 |
<?php endif;?>
|
34 |
|
35 |
<?php if ($_address->getFirstname()):?>
|
36 |
+
<input type="hidden" name="ceFirstName" value="<?php echo utf8_decode($_address->getFirstname()); ?>" />
|
37 |
<?php endif;?>
|
38 |
|
39 |
<?php if ($_address->getCompany()):?>
|
40 |
+
<input type="hidden" name="ceCompanyName" value="<?php echo utf8_decode($_address->getCompany()); ?>" />
|
41 |
<?php endif;?>
|
42 |
|
43 |
<?php if ($this->getShippingAddressStreet(1)): //1ère ligne de l'adresse dans Magento = 3ème champ adresse dans SoCo ?>
|
44 |
+
<input type="hidden" name="ceAdress3" value="<?php echo utf8_decode($this->getShippingAddressStreet(1)); ?>" />
|
45 |
<?php endif;?>
|
46 |
|
47 |
<?php if ($this->getShippingAddressStreet(2)):?>
|
48 |
+
<input type="hidden" name="ceAdress1" value="<?php echo utf8_decode($this->getShippingAddressStreet(2)); ?>" />
|
49 |
<?php endif;?>
|
50 |
|
51 |
<?php if ($this->getShippingAddressStreet(3)):?>
|
52 |
+
<input type="hidden" name="ceAdress2" value="<?php echo utf8_decode($this->getShippingAddressStreet(3)); ?>" />
|
53 |
<?php endif;?>
|
54 |
|
55 |
<?php if ($this->getShippingAddressStreet(4)):?>
|
56 |
+
<input type="hidden" name="ceAdress4" value="<?php echo utf8_decode($this->getShippingAddressStreet(4)); ?>" />
|
57 |
<?php endif;?>
|
58 |
|
59 |
<?php if ($_address->getPostcode()):?>
|
60 |
+
<input type="hidden" name="ceZipCode" value="<?php echo utf8_decode($_address->getPostcode()); ?>" />
|
61 |
<?php endif;?>
|
62 |
|
63 |
<?php if ($_address->getCity()):?>
|
64 |
+
<input type="hidden" name="ceTown" value="<?php echo utf8_decode($_address->getCity()); ?>" />
|
65 |
<?php endif;?>
|
66 |
|
67 |
<?php if ($_address->getEmail()):?>
|
68 |
+
<input type="hidden" name="ceEmail" value="<?php echo utf8_decode($_address->getEmail()); ?>" />
|
69 |
<?php endif;?>
|
70 |
|
71 |
<?php if ($_address->getTelephone()):?>
|
72 |
+
<input type="hidden" name="cePhoneNumber" value="<?php echo utf8_decode($_address->getTelephone()); ?>" />
|
73 |
<?php endif;?>
|
74 |
|
75 |
<?php if ($_address->getWeight()):?>
|
76 |
+
<input type="hidden" name="dyWeight" value="<?php echo utf8_decode($_helper->getFormatedWeight($_address->getWeight())); ?>" />
|
77 |
<?php endif;?>
|
78 |
|
79 |
<?php // suits with free shipping which can be set up by cart rules ?>
|
80 |
+
<?php $forwardingCharges = ($_address->getFreeShipping() === '1') ? 0 : $_address->getShippingAmount(); ?>
|
81 |
+
<input type="hidden" name="dyForwardingCharges" value="<?php echo utf8_decode($_helper->getFormatedShippingPrice($forwardingCharges)); ?>" />
|
82 |
|
83 |
<?php if ($_address->getCustomerId()):?>
|
84 |
+
<input type="hidden" name="trClientNumber" value="<?php echo utf8_decode($_address->getCustomerId()); ?>" />
|
85 |
<?php endif;?>
|
86 |
|
87 |
<?php if ($_address->getQuoteId()):?>
|
88 |
+
<input type="hidden" name="trOrderNumber" value="<?php echo utf8_decode($_address->getQuoteId()); ?>" />
|
89 |
<?php endif;?>
|
90 |
|
91 |
+
<input type="hidden" name="numVersion" value="<?php echo utf8_decode($_helper->getNumVersion()) ?>" />
|
92 |
|
93 |
<?php
|
94 |
/* donnée spécifique transmis au service, non interprétée par celui-ci et retournée
|
97 |
*/
|
98 |
?>
|
99 |
|
100 |
+
<input type="hidden" name="trReturnUrlOk" value="<?php echo utf8_decode($_helper->getSuccessUrl()); ?>" />
|
101 |
|
102 |
+
<input type="hidden" name="orderId" value="<?php echo utf8_decode($this->getTransaction()->getId()); ?>" />
|
103 |
|
104 |
+
<input type="hidden" name="signature" value="<?php echo utf8_decode($this->getTransaction()->getSignature()); ?>" />
|
105 |
</form>
|
106 |
|
107 |
<script type="text/javascript">
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ColiPoste_La_Poste_So_Colissimo</name>
|
4 |
-
<version>1.0
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -17,14 +17,17 @@ So Colissimo offre le choix parmi 5 solutions de livraison et un grand rése
|
|
17 |
* mon bureau de poste : livraison dans l'un des 10.000 bureaux de poste de votre choix.
|
18 |
* mon commerçant : livraison chez l'un des nombreux commerçants de notre réseau partenaire.
|
19 |

|
20 |
-
Testé et validé sur Magento
|
|
|
|
|
|
|
21 |

|
22 |
Réalisation par Smile.</description>
|
23 |
-
<notes>Compatible 1.
|
24 |
<authors><author><name>Berlioz</name><user>Aline</user><email>Aline.BERLIOZ@laposte.fr</email></author></authors>
|
25 |
-
<date>2011-
|
26 |
-
<time>
|
27 |
-
<contents><target name="magedesign"><dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="socolissimosimplicite"><file name="empty.phtml" hash="01e4359097f904f0caa50d7175d1fa3c"/><dir name="form"><file name="failure.phtml" hash="b0692966e1ed1e32d31ad676ccd3dcba"/></dir><file name="form.phtml" hash="
|
28 |
<compatible/>
|
29 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
30 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ColiPoste_La_Poste_So_Colissimo</name>
|
4 |
+
<version>1.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
17 |
* mon bureau de poste : livraison dans l'un des 10.000 bureaux de poste de votre choix.
|
18 |
* mon commerçant : livraison chez l'un des nombreux commerçants de notre réseau partenaire.
|
19 |

|
20 |
+
Testé et validé sur Magento :
|
21 |
+
- CE 1.3.2.4, CE 1.4, CE 1.5.0.1, CE 1.6.1.0
|
22 |
+
- PE 1.8
|
23 |
+
- EE 1.8, EE 1.9, EE 1.10
|
24 |

|
25 |
Réalisation par Smile.</description>
|
26 |
+
<notes>Compatible 1.6.1.0</notes>
|
27 |
<authors><author><name>Berlioz</name><user>Aline</user><email>Aline.BERLIOZ@laposte.fr</email></author></authors>
|
28 |
+
<date>2011-11-08</date>
|
29 |
+
<time>15:16:03</time>
|
30 |
+
<contents><target name="magedesign"><dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="socolissimosimplicite"><file name="empty.phtml" hash="01e4359097f904f0caa50d7175d1fa3c"/><dir name="form"><file name="failure.phtml" hash="b0692966e1ed1e32d31ad676ccd3dcba"/></dir><file name="form.phtml" hash="c458a6dbd529d073bbfc7291c62920ad"/><dir name="onepage"><dir name="shipping_method"><dir name="available"><file name="default.phtml" hash="2f84bc01d0599cfe27ef03a4c2813795"/><file name="socolissimosimplicite.phtml" hash="642ba70f2faa328f7e3afc10ab3876ec"/></dir><file name="available.phtml" hash="fe9843962b010778fa6dd11b10828a90"/></dir><file name="shipping_method.phtml" hash="180da1c16cff34b3d180d96720bde6f9"/></dir></dir></dir><dir name="layout"><file name="socolissimosimplicite.xml" hash="ecb0d6e12eec4606a54b12e421e9ff72"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="fr_FR"><file name="LaPoste_SoColissimoSimplicite.csv" hash="3b2a032525266c476fd3aec64aa81730"/></dir></dir></target><target name="magecommunity"><dir><dir name="LaPoste"><dir name="SoColissimoSimplicite"><dir name="Block"><file name="Form.php" hash="6bf92465fc24a46184653cb93156ef06"/><dir name="Onepage"><dir name="Shipping"><dir name="Method"><dir name="Available"><file name="Item.php" hash="f53ff832b868363db948d30d66d317bc"/></dir><file name="Available.php" hash="934af40303dc2217111d2b0bae90a0c2"/></dir></dir></dir><file name="Onepage.php" hash="79b4d36b3bff494f04605b860b2a73b0"/></dir><dir name="Helper"><file name="Data.php" hash="4de2e6c87e9a4770923913a0ee44416e"/></dir><dir name="Model"><dir name="Carrier"><file name="ShippingMethod.php" hash="9f6c4ef6716ac0e3889ba2e304e65107"/></dir><dir name="Mysql4"><dir name="Transaction"><file name="Collection.php" hash="dc2f61004ac7acd0af8f10574ec41880"/></dir><file name="Transaction.php" hash="0f5a3d0c1b36f3702c737bdec5b6a4cb"/></dir><file name="Observer.php" hash="6b6f9c5be3a6788b03e087e471f32c83"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Shipping"><file name="Amountbasetype.php" hash="bca2ac197de8909cfe622b05c2f89cca"/></dir></dir></dir></dir><file name="Transaction.php" hash="6f017b6fbe083a13564700bd494a56f1"/></dir><dir name="Test"><dir name="Model"><dir name="Carrier"><file name="ShippingMethodTest.php" hash="0af0dc51d6c0b99a466d19242c4e915f"/></dir></dir></dir><dir name="controllers"><file name="FormController.php" hash="e18ee28be1be5894b4fef19b64e5426f"/><file name="OnepageController.php" hash="f0758f5e2c0873ba517ab675672b2892"/></dir><dir name="etc"><file name="config.xml" hash="f6a9ed5f9ec072a0d48ac8dc4b075240"/><file name="system.xml" hash="0250e51f18b510fc093054ae524ff0ff"/></dir><dir name="sql"><dir name="socolissimosimplicite_setup"><file name="mysql4-install-1.0.0.php" hash="52761c955270d44c5a0ca4b28b86d70d"/><file name="mysql4-uninstall-0.1.0.php" hash="a0907ec1437960b6587d87827ad2ba24"/><file name="mysql4-upgrade-1.0.6-1.0.7.php" hash="829fcd5f192109ec0722a3269e8737c5"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="LaPoste_SoColissimoSimplicite.xml" hash="b95ad07dda6ce0fb25d6ece5750d0f0d"/></dir></dir></target></contents>
|
31 |
<compatible/>
|
32 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
33 |
</package>
|