Exemplo n.º 1
0
 public static function loadMenuByLang()
 {
     $shopId = Context::getContext()->shop->id;
     $langId = intval($_POST['langId']);
     $itemId = intval($_POST['itemId']);
     $item = VerticalMegaMenusLibraries::getMenuLangById($itemId, $langId, $shopId);
     // DB::getInstance()->getRow("Select * From "._DB_PREFIX_."flexiblecustom_modules_lang Where module_id = ".$itemId." AND id_lang = ".$langId." AND id_shop = ".$shopId);
     $response = new stdClass();
     if ($item) {
         $response->title = $item['title'];
         $response->image_alt = $item['image_alt'];
         $response->html = $item['html'];
     } else {
         $response->title = '';
         $response->image_alt = '';
         $response->html = '';
     }
     die(Tools::jsonEncode($response));
 }