// Autoset id_carrier on the cart constructor + Replace a hookExec()

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10420 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2011-11-22 14:09:52 +00:00
parent 3f649efee7
commit da416dea61
4 changed files with 35 additions and 11 deletions
+2 -2
View File
@@ -104,7 +104,7 @@ class CartControllerCore extends FrontController
{
if (!Cart::getNbProducts((int)($this->context->cart->id)))
{
$this->context->cart->delivery_option = '';
$this->context->cart->setDeliveryOption(null);
$this->context->cart->gift = 0;
$this->context->cart->gift_message = '';
$this->context->cart->update();
@@ -249,7 +249,7 @@ class CartControllerCore extends FrontController
$id_country = (isset($deliveryAddress) && $deliveryAddress->id) ? $deliveryAddress->id_country : Configuration::get('PS_COUNTRY_DEFAULT');
$result['carriers'] = Carrier::getCarriersForOrder(Country::getIdZone($id_country), $groups);
//$result['checked'] = Carrier::getDefaultCarrierSelection($result['carriers'], (int)$this->cart->id_carrier);
$result['HOOK_EXTRACARRIER'] = Module::hookExec('extraCarrier', array('address' => (isset($deliveryAddress) && (int)$deliveryAddress->id) ? $deliveryAddress : null));
$result['HOOK_EXTRACARRIER'] = Hook::exec('extraCarrier', array('address' => (isset($deliveryAddress) && (int)$deliveryAddress->id) ? $deliveryAddress : null));
}
$result['summary'] = $this->context->cart->getSummaryDetails();
$result['customizedDatas'] = Product::getAllCustomizedDatas($this->context->cart->id, null, true);