// Context part 12

This commit is contained in:
tDidierjean
2011-07-19 09:28:11 +00:00
parent ff81f71449
commit 52339502b6
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();