// Merge -> revision 9124

This commit is contained in:
rMalie
2011-10-07 09:54:43 +00:00
parent 22d560688d
commit d46fbbc039
56 changed files with 1682 additions and 1656 deletions
+9 -1
View File
@@ -53,7 +53,7 @@ class CanadaPost extends CarrierModule
{
$this->name = 'canadapost';
$this->tab = 'shipping_logistics';
$this->version = '0.1';
$this->version = '0.5';
$this->author = 'PrestaShop';
$this->limited_countries = array('ca');
@@ -1390,6 +1390,14 @@ class CanadaPost extends CarrierModule
{
// Init var
$address = new Address($params->id_address_delivery);
if (!Validate::isLoadedObject($address))
{
// If address is not loaded, we take data from shipping estimator module (if installed)
global $cookie;
$address->id_country = $cookie->id_country;
$address->id_state = $cookie->id_state;
$address->postcode = $cookie->postcode;
}
$recipient_country = Db::getInstance()->getRow('SELECT `iso_code` FROM `'._DB_PREFIX_.'country` WHERE `id_country` = '.(int)($address->id_country));
$recipient_state = Db::getInstance()->getRow('SELECT `iso_code` FROM `'._DB_PREFIX_.'state` WHERE `id_state` = '.(int)($address->id_state));
$shipper_country = Db::getInstance()->getRow('SELECT `iso_code` FROM `'._DB_PREFIX_.'country` WHERE `id_country` = '.(int)(Configuration::get('CP_CARRIER_COUNTRY')));
+1 -1
View File
@@ -2,7 +2,7 @@
<module>
<name>canadapost</name>
<displayName><![CDATA[Canada Post Carrier]]></displayName>
<version><![CDATA[0.1]]></version>
<version><![CDATA[0.5]]></version>
<description><![CDATA[Offer your customers, different delivery methods with Canada Post]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[shipping_logistics]]></tab>