// Merge -> revision 9124
This commit is contained in:
@@ -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')));
|
||||
|
||||
Reference in New Issue
Block a user