[-] Core: Fix #PSCFV-5966 the tax rate applied to shipping cost for the visitors was the product tax rate
This commit is contained in:
+8
-6
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user