// Merge -> revision 9124
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<module>
|
||||
<name>uspscarrier</name>
|
||||
<displayName><![CDATA[U.S.P.S. Rate Calulator]]></displayName>
|
||||
<version><![CDATA[1.2]]></version>
|
||||
<version><![CDATA[1.2.1]]></version>
|
||||
<description><![CDATA[Calculates shipping rates for United States Postal Service for Domestic shipping within the USA.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[shipping_logistics]]></tab>
|
||||
|
||||
@@ -53,7 +53,7 @@ class UspsCarrier extends CarrierModule
|
||||
{
|
||||
$this->name = 'uspscarrier';
|
||||
$this->tab = 'shipping_logistics';
|
||||
$this->version = '1.2';
|
||||
$this->version = '1.2.1';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->limited_countries = array('us');
|
||||
|
||||
@@ -1557,6 +1557,14 @@ class UspsCarrier 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('USPS_CARRIER_COUNTRY')));
|
||||
|
||||
Reference in New Issue
Block a user