magiccart / magicmenu

magiccart/magicmenu

Make megamenu, dropdown menu, mobile menu easy all in one.

magento2-module Compatibility: 2.4.7-2.4.9 Code Quality: Fail Tests: N/A Security: Pass OSL-3.0, AFL-3.0

Are you the maintainer of magiccart?

Packagento pulls magiccart's Composer packages from the public registry so buyers can find them here.

Claim the namespace to take ownership, publish new releases directly, and start charging for premium versions.

Claim this namespace →

Magento 2 Mega Menu

Welcome to Magepow Magento 2 Mega Menu! Our free module helps you create a user-friendly navigation experience and improve the usability of your online store.

For merchants who need professional assistance and reliable ongoing support, we recommend purchasing the module from Magepow. Our support service helps you get the most out of the module, resolve technical issues, and ensure a smoother experience when integrating it into your Magento store.

Magento 2 Mega menu extension is an indispensable component, and plays the role of website navigation to help customers easily categorize and find information. Without a menu, visitors to the page will have to spend time searching for each content on your website, thereby making them find it difficult, difficult to access and do not know what your website has main content. This will increase the user's bounce rate, thereby reducing the SEO quality of the website.

[image: Magento 2 Mega menu extension]

Mega menu, dropdown menu and mobile menu for Magento 2 / Adobe Commerce.

The module replaces the default store.menu block with a configurable navigation that supports
mega menu layouts, plain dropdown menus, an extra (custom) menu and a sidebar accordion menu.

Get started

Installation

composer require magiccart/magicmenu
bin/magento setup:upgrade
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

Manual installation: copy the module to app/code/Magiccart/Magicmenu and run the commands above
without the composer require line.

Need Professional Support?

Magepow Magento 2 Mega Menu is free and open-source, allowing you to build intuitive and user-friendly navigation for your Magento store.

If you need professional technical assistance, help with configuration, troubleshooting, or ongoing support, you can purchase the module with our support service directly from the Magepow website.

Get professional support and make the most of your Magento 2 Mega Menu.

Highlight features

1. Mega menu, dropdown menu or both

Mega menu

The mega menu saves horizontal space and gives every top category its own panel made of CMS
static blocks placed on the top, left, right and bottom of the category list.

[image: Mega menu]

Dropdown menu

A dropdown menu shows the sub categories on hover or on click. It fits catalogs with many
categories and keeps the navigation compact.

[image: Dropdown menu]

2. Extra menu

Magiccart > Magic Menu > Extra Menu adds standalone entries to the navigation. Each entry shows a
link, a CMS static block, or both.

[image: Extra menu]

3. Responsive and mobile menu

The menu adapts to the screen: the desktop navigation is replaced by a mobile menu below the
breakpoint defined in the configuration. The sticky option keeps the menu visible while scrolling.

4. Category label, image and thumbnail

Each category can show a label, a thumbnail and an image inside the mega menu. The values are set
in Catalog > Manage Categories and are stored as the magic_label, magic_thumbnail and
magic_image category attributes.

Configuration

Stores > Configuration > Magiccart > Magic Menu

Group Description
General Categories that are rendered as a simple dropdown instead of a mega menu.
Top Menu Horizontal menu: enable/disable, home button, multi store demo switcher, sticky menu, screen breakpoint, event (hover/click), full width mode, excluded categories.
Vertical Menu Same options as the top menu for the vertical navigation.
Accordion Enable the accordion menu rendered in the sidebar on category pages.

Category configuration

Catalog > Categories > <category>

  • Label – comma separated list of labels rendered next to the category name.
  • Thumbnail / Image – uploaded to pub/media/magiccart/magicmenu/thumbnail/<id>.png and
    pub/media/magiccart/magicmenu/images/<id>.png.

Mega menu / extra menu configuration

Magiccart > Magic Menu > Menu binds a top category to a layout made of CMS static blocks
(top, left, right, bottom) with configurable proportions.

Magiccart > Magic Menu > Extra Menu adds a standalone entry to the navigation. It renders either
a link or a CMS static block.

The values stored in the top, left, right, bottom and ext_content fields are CMS block
identifiers
, not block IDs.

Proportions of the mega menu

The width of the mega menu is shared between the category list, the left block and the right block.
The three proportion fields are weights: the total of the weights is used to calculate the width of
every part.

Proportion Meaning
Proportion: Category Weight of the category list.
Proportion: Block Left Weight of the block displayed on the left.
Proportion: Block Right Weight of the block displayed on the right.

Example: Proportion: Category = 2, Proportion: Block Left = 1 and Proportion: Block Right = 0
give 67% of the width to the categories and 33% to the left block.

Extension points

Type Name
Service contract Magiccart\Magicmenu\Api\MagicmenuRepositoryInterface
Data contract Magiccart\Magicmenu\Api\Data\MagicmenuInterface
Search results Magiccart\Magicmenu\Api\Data\MagicmenuSearchResultsInterface
Frontend block Magiccart\Magicmenu\Block\Menu
Configuration reader Magiccart\Magicmenu\Model\Config

Use the repository instead of loading or saving the model directly:

$menu = $this->magicmenuRepository->getById($id);
$menu->setName('New name');
$this->magicmenuRepository->save($menu);

Upgrade notes (2.0.0)

  • The module moved from setup_version / InstallSchema / InstallData to declarative schema
    (etc/db_schema.xml) and a data patch (Setup/Patch/Data/AddCategoryMagicAttributes.php).
    The patch is idempotent: existing category attributes are not recreated.
  • The CMS static blocks are now resolved by identifier (Magento\Cms\Block\BlockByIdentifier)
    instead of the deprecated Magento\Cms\Block\Block.
  • Magiccart\Magicmenu\Helper\Data is deprecated, use Magiccart\Magicmenu\Model\Config instead.
  • The Registry based transfer of the edited entity between controller and form block was removed.
  • The exclude_html_desktop and exclude_html_mobile settings were removed, the attributes they
    rendered were never read by the JavaScript.

Development

vendor/bin/phpcs --standard=Magento2 --severity=10 app/code/Magiccart/Magicmenu
vendor/bin/phpcs --standard=Magento2 --extensions=php,phtml app/code/Magiccart/Magicmenu
vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist app/code/Magiccart/Magicmenu/Test/Unit

License

OSL-3.0 / AFL-3.0. See LICENSE.

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

Our Magento 2 Extensions

Our Magento 2 services

Our Magento 2 Themes

Our Shopify App

Our Shopify Themes

Our WordPress Theme

Changelog

All notable changes to the Magiccart_Magicmenu module are documented in this file.

The format is based on Keep a Changelog and this project
adheres to Semantic Versioning.

[2.0.0] - 2025-10-21

Added

  • Service contracts: Api\MagicmenuRepositoryInterface, Api\Data\MagicmenuInterface and
    Api\Data\MagicmenuSearchResultsInterface with a Model\MagicmenuRepository implementation.
  • Model\Config as a dedicated scope configuration reader.
  • Declarative database schema (etc/db_schema.xml) with etc/db_schema_whitelist.json.
  • Idempotent data patch Setup/Patch\Data\AddCategoryMagicAttributes for the category attributes.
  • declare(strict_types=1) and the copyright header in every PHP and template file.
  • ADMIN_RESOURCE constant and HttpGetActionInterface / HttpPostActionInterface on every admin
    controller.
  • Unit tests for the repository, the configuration reader and the model.

Changed

  • The Registry based transfer of the edited entity between the controller and the form block was
    replaced by the repository.
  • CMS static blocks are resolved by identifier with Magento\Cms\Block\BlockByIdentifier; the
    deprecated Magento\Cms\Block\Block is no longer used.
  • All frontend output is escaped with the Magento\Framework\Escaper.
  • The frontend JavaScript no longer logs vendor branding and no longer depends on the missing
    easing RequireJS module.
  • The file system access in the frontend block uses Magento\Framework\Filesystem\Driver\File
    instead of the native file_exists() function.
  • The admin comment block that linked to an external product was replaced with a plain comment.

Removed

  • The exclude_html_desktop and exclude_html_mobile settings of the Top Menu and Vertical
    Menu
    groups, together with their default values and the data-exclude_html_* attributes they
    rendered. Nothing in the JavaScript or the LESS ever read these attributes.
  • Setup/InstallSchema.php and Setup/InstallData.php (legacy install scripts).
  • Model/Category.php, an unused model.
  • Block/Adminhtml/System/DynamicComment.php, an external link in the admin.
  • etc/frontend/routes.xml, there is no frontend controller.
  • The unused Block/Menu::getLogo() method.

Fixed

  • The admin edit layouts (magicmenu_menu_edit.xml, magicmenu_extra_edit.xml) did not declare the
    form child block of the form container. The container calls getChildBlock('form') and threw
    Call to a member function setData() on bool, so the Add New / Edit pages were broken and the
    tab fields were rendered outside of the edit_form element. The unused
    Block\Adminhtml\{Menu,Extra}\Edit\Form blocks are now wired into the layouts.
  • The Block grid renderer resolved CMS blocks by ID although identifiers are stored. Both the
    renderer and the frontend block now use the identifier.
  • The admin delete action no longer tries to delete a record when no valid ID is provided.
  • The accordion menu no longer passes an unsupported easing name to jQuery.
  • The frontend JavaScript no longer depends on the easing RequireJS module, which does not exist
    in Magento and made the whole magicmenu module fail to load.
Versions
Version Stability QA Status Compatibility Released
2.0.0 stable Fail Magento 2.4.7-2.4.9 Details 2026-10-21 11:57:49
1.1.6 stable Not tested Not yet tested Details 2026-10-21 11:47:57
1.1.5 stable Fail Magento 2.4.7-2.4.9 Details 2026-10-21 02:35:41
1.1.4 stable Fail Magento 2.4.7-2.4.9 Details 2026-07-09 15:45:18
1.1.3 stable Fail Magento 2.4.7 Details 2025-07-10 16:04:16
1.1.2 stable Not tested Not yet tested Details 2024-06-25 16:21:23
1.1.1 stable Not tested Not yet tested Details 2023-09-24 06:46:47
1.1.0 stable Not tested Not yet tested Details 2023-08-21 14:47:51
1.0.9 stable Not tested Not yet tested Details 2022-11-10 08:12:11
1.0.8 stable Not tested Not yet tested Details 2022-07-10 06:27:34
1.0.7 stable Not tested Not yet tested Details 2022-05-18 04:38:23
1.0.6 stable Not tested Not yet tested Details 2021-07-13 08:17:45
1.0.5 stable Not tested Not yet tested Details 2021-06-04 09:22:59
1.0.4 stable Not tested Not yet tested Details 2021-02-19 09:59:29
1.0.3 stable Not tested Not yet tested Details 2020-12-26 08:31:04
1.0.2 stable Not tested Not yet tested Details 2020-11-09 12:46:10
1.0.1 stable Not tested Not yet tested Details 2020-09-04 04:55:23
1.0.0 stable Not tested Not yet tested Details 2020-07-22 02:49:52

Requires 1

Package Constraint
magepow/core ^1.1.2

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass Pass

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Warning 93 93 warnings (ruleset: Magento2), 55 auto-fixable with phpcbf
PHPMD Warning 19 19 rule violations (UnusedLocalVariable:5, ExcessiveMethodLength:4, NPathComplexity:3, CyclomaticComplexity:2, MissingImport:2)
Cpd Warning 9 9 duplicated chunks spanning 492 total lines (min-lines=5, min-tokens=70)
Composer validate Pass 0

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 42 42
2.4.8 42 42
2.4.9 36 36

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
OSL-3.0, AFL-3.0
Authors

More from magiccart

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.