git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7620 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -621,7 +621,7 @@ class CustomerCore extends ObjectModel
|
|||||||
if (!$context->cart OR !$context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')})
|
if (!$context->cart OR !$context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')})
|
||||||
$id_address = (int)(Db::getInstance()->getValue('SELECT `id_address` FROM `'._DB_PREFIX_.'address` WHERE `id_customer` = '.(int)($id_customer).' AND `deleted` = 0 ORDER BY `id`'));
|
$id_address = (int)(Db::getInstance()->getValue('SELECT `id_address` FROM `'._DB_PREFIX_.'address` WHERE `id_customer` = '.(int)($id_customer).' AND `deleted` = 0 ORDER BY `id`'));
|
||||||
else
|
else
|
||||||
$id_address = $cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
|
$id_address = $context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
|
||||||
$ids = Address::getCountryAndState($id_address);
|
$ids = Address::getCountryAndState($id_address);
|
||||||
return (int)($ids['id_country'] ? $ids['id_country'] : Configuration::get('PS_COUNTRY_DEFAULT'));
|
return (int)($ids['id_country'] ? $ids['id_country'] : Configuration::get('PS_COUNTRY_DEFAULT'));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -460,7 +460,7 @@ class ShopCore extends ObjectModel
|
|||||||
return ($type == 'shop' || $type == 'group') ? '' : array('', '');
|
return ($type == 'shop' || $type == 'group') ? '' : array('', '');
|
||||||
|
|
||||||
// Parse shopContext cookie value (E.g. s-2, g-4)
|
// Parse shopContext cookie value (E.g. s-2, g-4)
|
||||||
$split = explode('-', Context::getContext()->cookie);
|
$split = explode('-', Context::getContext()->cookie->shopContext);
|
||||||
$shopID = $shopGroupID = '';
|
$shopID = $shopGroupID = '';
|
||||||
if (count($split) == 2)
|
if (count($split) == 2)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user