medamis Posted June 19, 2020 Share Posted June 19, 2020 (edited) Hi, I want to add custom products list to sp mega menu. Now I can only add items from: New, Bestseller, Featured and Special. Can I create custom list from categories? Those available options are not good for me. EDIT I found solution. If you want add custom category you have to edit SP Mega menu files: Megamenu.php and spmegamenu.php. In Megamenu.php you have to find case 'productlist' and then in this switch add your custom php snippet with category ID. In my case I added something like this: case 'salon': $category = new Category(193); $products = $category->getProducts((int)(Context::getContext()->language->id), 1, 1, null, null, false, true, true, $limit); break; 193 is category ID. Then you have to add admin option in spmegamenu.php. First find list_category array and then add your custom option. Now custom option will be available in SP Mega Menu config panel. array( 'id' => 'salon', 'label' => $this->l('Salon') ), Edited June 19, 2020 by medamis (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now