// Context part 12

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7649 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-19 09:28:11 +00:00
parent 8a0a62ae03
commit 89213e18e5
53 changed files with 184 additions and 196 deletions
+4 -6
View File
@@ -31,6 +31,7 @@ class CartControllerCore extends FrontController
{
$this->init();
$this->preProcess();
$context = Context::getContext();
if (Tools::getValue('ajax') == 'true')
{
@@ -38,15 +39,12 @@ class CartControllerCore extends FrontController
{
if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1)
{
if (self::$cookie->id_customer)
{
$customer = new Customer((int)(self::$cookie->id_customer));
$groups = $customer->getGroups();
}
if (Validate::isLoadedObject($context->customer))
$groups = $context->customer->getGroups();
else
$groups = array(1);
if ((int)self::$cart->id_address_delivery)
$deliveryAddress = new Address((int)self::$cart->id_address_delivery);
$deliveryAddress = new Address(self::$cart->id_address_delivery);
$result = array('carriers' => Carrier::getCarriersForOrder((int)Country::getIdZone((isset($deliveryAddress) AND (int)$deliveryAddress->id) ? (int)$deliveryAddress->id_country : (int)Configuration::get('PS_COUNTRY_DEFAULT')), $groups));
}
$result['summary'] = self::$cart->getSummaryDetails();