scandipwa / menu-organizer

scandipwa/menu-organizer

Scandiweb Menu Organizer for ScandiPWA

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

Are you the maintainer of scandipwa?

Packagento pulls scandipwa'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 →

ScandiPWA_MenuOrganizer

This repository is a module for Magento 2. This module is used to create customized navigation.

Menu

  1. Supported features
  2. Installation
  3. How to use

    3.1. Creating first menu

    3.2. Adding menu items

    3.3. Structure for ScandiPWA

    3.4. How to enable/disable menu per store
  4. For development

    4.1. DB structure

    4.2. GraphQl structure

    4.3. Quick file access

1. Supported features

  • Multilevel structured menu
  • Magento categories
  • Magento CMS pages
  • Custom URLs
  • Icons for menu items
  • Custom CSS classes

2. Installation

Installation via composer:

composer require scandipwa/menu-organizer

3. How to use

3.1. Creating first menu

  1. Open admin panel
  2. Locate admin/scandipwa_menuorganizer/menu via URL or by using side panel menu: Scandiweb -> Navigation -> MenuManager
  3. Find Add New Menu button in the right top corner, click it.
  4. Fill out form fields:
    1. Required:
      • Title
      • Menu identifier (used in graphql requests)
      • Menu status (enabled / disabled)
    2. Optional:
      • Custom Menu CSS Class
      • Store (to which store-view this menu is assigned to)
  5. Click Save.

image

3.2. Adding menu items

  1. Open menu.
  2. Find the Assigned Menu Items in the navigation on the left. click it.
  3. Click Add item in the top right corner.
  4. Fill out form fields:
    1. Required:
      • Menu Item Title
      • URL Type (Custom URL / Category / CMS page)
      • URL Type specific field: Custom URL | Category | CMS Page
      • Parent (Parent menu item)
      • Menu Item Status (enabled / disabled)
    2. Optional:
      • Menu Item CSS Class
      • URL Attributes
      • Icon
      • Icon Alt Text
      • Menu Item Sort Order (Item with lowest number will be on top)
  5. Click Save.

image

3.3. Structure for ScandiPWA

By default ScandiPWA will only render yellow elements (check image) and ignore the red ones.

image

The example below would result in a menu with the options Women, Men and Accessories and their respective sub-items (such as Bags and Tops).

image

3.4. How to enable/disable menu per store

To enable a menu for a specific store, make sure you have selected the store in the menu configuration on step 3.1.4.ii.
Then, select the correct menu id in the configuration:

  1. Open admin panel
  2. Using the side panel menu, go to: Stores -> Settings -> Configuration
  3. Find Scope and select the desired store view.
  4. Using the menu dropdown, go to: ScandiPWA -> Content Customization -> Header and Menu
  5. Uncheck the checkbox Use Website
  6. Select the desired menu in Menu to display
  7. Tap Save Config
  8. Flush Cache Storage

image


4. For development

4.1. DB structure

image

4.2. GraphQl structure

type Query {
    scandiwebMenu(identifier: String!): Menu @resolver(class: "ScandiPWA\\MenuOrganizer\\Model\\Resolver\\Menu")
}

type Menu {
    menu_id: ID 
    title: String 
    is_active: Boolean 
    css_class: String 
    items: [Item]
}

type Item  {
    item_id: ID 
    icon: String
    title: String 
    item_class: String @doc(description: "CSS class of the item")
    parent_id: Int 
    url: String 
    url_type: Int @doc(description: "0 - regular link, 1 - cms page, 2 - category")
    position: Int 
    is_active: Boolean 
    cms_page_identifier: String 
    is_promo: Int @doc(description: "Boolean if category is promotional category")
    promo_image: String @doc(description: "Promo category image background")
    category_id: Int @doc(description: "Category id")
}

Or check: schema.graphqls

4.3. Quick file access:

Scandiweb_Menumanager changelog

0.1.0:

  • added install schema for menu / menu items / menu-store mapping
  • added CRUD functionality for menus
  • added menu mass actions
  • added menus functionality to be based on 'store' level
  • added CRUD functionality for menu items
  • added custom output for categories/menus as dropdown options
Versions
Version Stability QA Status Compatibility Released
2.1.5 stable Fail Magento 2.4.7 Details 2021-10-06 22:27:36
2.1.4 stable Not tested Not yet tested Details 2021-07-28 12:30:08
2.1.3 stable Not tested Not yet tested Details 2021-07-19 16:46:05
2.1.2 stable Not tested Not yet tested Details 2021-07-13 21:21:43
2.1.1 stable Not tested Not yet tested Details 2021-03-05 07:04:58
2.1.0 stable Not tested Not yet tested Details 2020-09-07 11:00:33
2.0.0 stable Not tested Not yet tested Details 2020-06-26 09:19:23
1.1.10 stable Not tested Not yet tested Details 2020-06-18 09:16:36
1.1.9 stable Not tested Not yet tested Details 2020-06-15 13:38:02
1.1.8 stable Not tested Not yet tested Details 2020-05-25 15:26:37
1.1.7 stable Not tested Not yet tested Details 2020-05-12 08:46:29
1.1.6 stable Not tested Not yet tested Details 2020-05-08 15:04:21
1.1.5 stable Not tested Not yet tested Details 2020-05-07 11:03:12
1.1.4 stable Not tested Not yet tested Details 2019-12-18 12:48:35
1.1.3 stable Not tested Not yet tested Details 2019-12-09 15:13:59
1.1.2 stable Not tested Not yet tested Details 2019-09-30 12:13:39
1.1.1 stable Not tested Not yet tested Details 2019-09-09 13:23:47
1.1.0 stable Not tested Not yet tested Details 2019-09-09 13:20:52
1.0.3 stable Not tested Not yet tested Details 2019-06-04 14:12:43
1.0.2 stable Not tested Not yet tested Details 2019-04-25 13:52:43
1.0.1 stable Not tested Not yet tested Details 2019-03-08 15:33:49
1.0.0 stable Not tested Not yet tested Details 2019-03-08 15:00:10

Requires 9

Package Constraint
magento/framework *
magento/module-cms *
magento/module-store *
magento/module-catalog *
magento/module-backend *
magento/module-captcha *
magento/module-media-storage *
magento/module-ui *
scandiweb/module-core ~0.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 Fail di error
2.4.9 Fail di error Fail di error

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 259 259 warnings (ruleset: Magento2) — 152 auto-fixable with phpcbf
PHPMD Warning 48 48 rule violations (IfStatementAssignment:16, MissingImport:10, UndefinedVariable:9, UnusedFormalParameter:5, ExcessiveMethodLength:2)
Cpd Pass 0
Composer validate Info 8 valid; 8 advisory notes (composer validate --strict)

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 75 75
2.4.8 75 77
2.4.9 77 77

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

More from scandipwa

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.