Esempio n. 1
0
 public function hookAjaxCall($params)
 {
     if (Configuration::get('PS_CATALOG_MODE')) {
         return;
     }
     $this->assignContentVars($params);
     $res = Tools::jsonDecode($this->display(__FILE__, 'blockcart-json.tpl'), true);
     if (is_array($res) && ($id_product = Tools::getValue('id_product')) && Configuration::get('PS_BLOCK_CART_SHOW_CROSSSELLING')) {
         $this->smarty->assign('orderProducts', OrderDetail::getCrossSells($id_product, $this->context->language->id, Configuration::get('PS_BLOCK_CART_XSELL_LIMIT')));
         $res['crossSelling'] = $this->display(__FILE__, 'crossselling.tpl');
     }
     $res = Tools::jsonEncode($res);
     return $res;
 }