shop->id ? ' AND id_shop = '.(int)Context::getContext()->shop->id : ''); if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql)) { return Meta::completeMetaTags($row, $row['meta_title']); } return Meta::getHomeMetas($id_lang, $page_name); } public static function getMetaPostCms($id_post, $id_lang, $page_name) { $sql = 'SELECT `meta_title`, `meta_desc` FROM `'._DB_PREFIX_.'cmsps_posts_lang` WHERE id_lang = '.(int)$id_lang.' AND id_post = '.(int)$id_post. ((int)Context::getContext()->shop->id ? ' AND id_shop = '.(int)Context::getContext()->shop->id : ''); if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql)) { return Meta::completeMetaTags($row, $row['meta_title']); } return Meta::getHomeMetas($id_lang, $page_name); } public static function getMetaEditoCms($id_edito, $id_lang, $page_name) { $sql = 'SELECT `meta_title`, `meta_desc` FROM `'._DB_PREFIX_.'cmsps_editos_lang` WHERE id_lang = '.(int)$id_lang.' AND id_edito = '.(int)$id_edito. ((int)Context::getContext()->shop->id ? ' AND id_shop = '.(int)Context::getContext()->shop->id : ''); if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql)) { return Meta::completeMetaTags($row, $row['meta_title']); } return Meta::getHomeMetas($id_lang, $page_name); } }