[-] Core: Fix #PSCFV-5966 the tax rate applied to shipping cost for the visitors was the product tax rate

This commit is contained in:
Rémi Gaillard
2012-12-04 15:09:41 +01:00
parent a4b6594f9c
commit b414bd06a4
2 changed files with 13 additions and 9 deletions
+8 -6
View File
@@ -337,12 +337,6 @@ class AddressCore extends ObjectModel
*/
public static function initialize($id_address = null)
{
// set the default address
$address = new Address();
$address->id_country = (int)Context::getContext()->country->id;
$address->id_state = 0;
$address->postcode = 0;
// if an id_address has been specified retrieve the address
if ($id_address)
{
@@ -351,6 +345,14 @@ class AddressCore extends ObjectModel
if (!Validate::isLoadedObject($address))
throw new PrestaShopException('Invalid address');
}
else
{
// set the default address
$address = new Address();
$address->id_country = (int)Context::getContext()->country->id;
$address->id_state = 0;
$address->postcode = 0;
}
return $address;
}