How to create custom module on Spryker for Backoffice?

Blog
Spread the love

Creating a custom module in Spryker Backoffice can help you tailor the platform to your unique business needs. Follow this guide to efficiently set up and implement your custom functionality.

  1. Prerequisites
  2. Ensure the following:

    • Spryker is installed and running locally.
    • Your IDE or terminal has access to the vendor/bin/console command.
    • You have sufficient knowledge of your module requirements (e.g., what data it will handle and what features it will provide).
    • If not, to install Spryker please visit : Install Spryker

  3. Install Code Generator
  4. Spryker provides the spryker/code-generator package, which can be installed via Composer.

    A. Add the Code Generator Package

    Run the following command:

    B. Add Custom Configuration

    Update file : your-spryker-project/src/Pyz/Zed/Console/ConsoleDependencyProvider.php

    Add below code

    img

    img

    C.Verify Installation

    After installation, verify that the code generator commands are available. Run:

    img

    Look for commands like:

    • code:generate:module
    • code:generate:controller
    • code:generate:facade
    • code:generate:template
    • code:generate:transfer
    • code:generate:table
  5. Plan the Module
  6. Determine:

    • Module Name: For example, BluethinkInc.
    • Namespace: Spryker modules typically reside in the src/Pyz/Zed/ or src/Pyz/Glue/ directory.
    • Features: What functionality your module will provide in the Backoffice.
  7. Use Code Generator
  8. Spryker provides commands to generate modules and components. Here’s how to use them:

    A.Generate a Module

    Run the following command under your project directory

    The console will ask for:

    • Organization: Enter Pyz (default for project-specific modules).
    • Module Name: Enter your desired module name (e.g., BluethinkInc).
    • Layer: Enter Zed (since you’re building for the Backoffice).
    • Application: Enter Zed.

    This will create the basic structure for your module under src/Pyz/Zed/BluethinkInc/.

    img

    img

    file path here now file is generated

    your-spryker-project/src/Pyz/Zed/BluethinkInc/

    img

    menu code generated you custom module path this

    your-spryker-project/src/Pyz/Zed/BluethinkInc/Communication/navigation.xml

    if you need add menu on backofficr go this file path
    your-spryker-project/config/Zed/navigation.xml

    and add this code

    img

    After add this you need run the following command:

    img

    Go to backoffice login page

    img

    img

bluethinkinc_blog

bluethinkinc_blog

2025-01-08

0

Leave a Reply

Your email address will not be published. Required fields are marked *

Find More Blogs

Customize lead qualification for a seamless experience

Spread the love When the 2024 Release Wave 2 was launched,

Create a Custom Console Command in Spryker

Spread the love In Spryker, developers can create custom

SALESFORCE

Spread the love Salesforce is a cloud-based software

CRUD Operation in Spryker Backoffice with a Custom Module

Spread the love Spryker is a highly flexible and modular

How to create custom module on Spryker for Backoffice?

Spread the love Creating a custom module in Spryker

How to Install Spryker Project with Docker on Local Machine

Spread the love Spryker is a flexible and scalable commerce

How to Add a Custom Tab to the Customer Order Detail Page in Magento 2

Spread the love Adding a custom tab to the Order Detail

Exception Handling in Java

Spread the love Introduction – Exception:An unwanted

How to add custom less file in Magento2

Spread the love Source files *.css included into layout

Spring Boot Microservices

Spread the love Microservices architecture has become

bluethinkinc Blogs