Jump to content

Edit History

medamis

medamis

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')

),

Screenshot 2020-06-19 at 14.41.16.png

Screenshot 2020-06-19 at 14.41.48.png

medamis

medamis

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.

 

 

Screenshot 2020-06-19 at 14.41.16.png

Screenshot 2020-06-19 at 14.41.48.png

×
×
  • Create New...