Jump to content

[Solved] Exclude category


viar

Recommended Posts

Halaw,

Semisal saya mau meng-exclude beberapa category/subcategory dari list menu category gimana caranya ya?
Tengs


buka modules\blockcategories\blockcategories.php, baris 102 ada query kyk gini ..

        $result = Db::getInstance()->ExecuteS('
       SELECT * FROM '._DB_PREFIX_.'category c 
       LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (c.id_category = cl.id_category AND id_lang = '.intval($params['cookie']->id_lang).')
       WHERE level_depth <= '.intval(Configuration::get('BLOCK_CATEG_MAX_DEPTH')).'
       AND c.active = 1
       ORDER BY level_depth, cl.name ASC');



modif jadi ..

        $result = Db::getInstance()->ExecuteS('
       SELECT * FROM '._DB_PREFIX_.'category c 
       LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (c.id_category = cl.id_category AND id_lang = '.intval($params['cookie']->id_lang).')
       WHERE level_depth <= '.intval(Configuration::get('BLOCK_CATEG_MAX_DEPTH')).'
       AND c.active = 1 AND c.id_category NOT IN (10,11)
       ORDER BY level_depth, cl.name ASC');



perhatikan AND c.id_category NOT IN (10,11)

tingal ganti 10,11 dengan kategori yg mw di exclude.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...