id_lang); $quantity = Tools::getValue('quantity', 1); $cart = new Cart((int)($cookie->id_cart)); $cart->id_lang = (int)($cookie->id_lang); if($idCombination != 0){ $price = $product->getPrice(true, $idCombination, 2) * $quantity; }else{ $price = $product->getPrice(true, NULL, 2) * $quantity; } $sale = Sale::getSaleFromCategory($product->id_category_default, false); if (isset($sale)) { $delivery_delay = (int)$sale->delivery_delay; } $bestSaleCart = Module::hookExec('bestSaleCart'); $link = new Link(); $tpl = $smarty->createTemplate('ajax_cart.tpl'); $tpl->assign(array( 'product' => $product, 'link' => $link, 'img_dir' => '/themes/site/img/', 'quantity' => $quantity, 'bestSaleCart' => $bestSaleCart, 'price' => number_format($price, 2, ',', ''), 'delivery_delay' => (isset($delivery_delay) ? $delivery_delay : null) )); echo $rendu = $tpl->fetch(); die; }else{ return false; } ?>