Skip to content

Commit

Permalink
Split sample extension to have smaller samples for Admin UI SDK (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
asalloum5 authored Jun 3, 2024
1 parent 9e6bdd1 commit 7155ad5
Show file tree
Hide file tree
Showing 104 changed files with 90,907 additions and 437 deletions.
27 changes: 27 additions & 0 deletions admin-ui-sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Adobe Commerce Admin UI SDK Examples

This directory contains examples for different extension points of the Adobe Commerce Admin UI SDK.

## Overview

The Adobe Commerce Admin UI SDK allows developers to extend the Commerce Admin to include custom menus, pages, and other features.
These examples demonstrate how to use the SDK to create these extensions.

## Directory Structure

- `menu`: Contains examples of how to create custom menus in the Commerce Admin.
- `order`: Contains examples of how to create
- `order view button`: custom order view button in the Commerce Admin.
- `order grid columns`: custom columns in the order grid in the Commerce Admin.
- `order mass action`: custom mass action in the order grid in the Commerce Admin.
- `product`: Contains examples of how to create
- `product grid columns`: custom columns in the product grid in the Commerce Admin.
- `product mass action`: custom mass action in the product grid in the Commerce Admin.

## Installation

Each example has its own README file with specific installation instructions. Please refer to the README file in the respective example directory for more information.

## Usage

After installing an example, you can access the custom features from the Commerce Admin panel.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ config.json
console.json

.idea
package-lock.json
.aws.tmp.creds.json
.parcel-cache
.DS_Store
Expand Down
42 changes: 42 additions & 0 deletions admin-ui-sdk/menu/custom-menu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Adobe Commerce Admin UI SDK - Custom Menu

This application extends the Adobe Commerce Admin UI by adding custom menus using the Adobe Commerce Admin UI SDK.

## Overview

The Adobe Commerce Admin UI SDK allows an App Builder developer to extend the Commerce Admin to include custom menus and pages.
These Admin customizations were traditionally defined in a PHP module, but the principles of Out-of-Process development require a more modern approach.

## Features

- **Custom Menus**: Create a new menu that redirects to the App Builder app.
- **Custom Sections**: Add custom section to the Commerce Admin panel.

## Prerequisites

- Adobe Commerce instance with IMS module installed and enabled.
- Adobe Commerce Admin UI SDK installed and enabled.
- Developer console access to the organization on App Builder.
- App Builder project created.

## Installation

- Run `npm install` to install the dependencies
- Run `aio auth:login` to login to your Adobe I/O account
- Run `aio app use` (select the correct project and workspace)
- Append .env file with the following values:
- `COMMERCE_BASE_URL=`
- `COMMERCE_CONSUMER_KEY=`
- `COMMERCE_CONSUMER_SECRET=`
- `COMMERCE_ACCESS_TOKEN=`
- `COMMERCE_ACCESS_TOKEN_SECRET=`
- Run `aio app deploy` to deploy the application

## Local testing

- Run `aio app run` to start the local development server.
- Create and run a server to redirect to your local application. Refer to the following documentation for more information: [Local Testing](https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/configuration/).

## Usage

After installation and configuration, you can access the custom menus and pages from the Commerce Admin panel.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 1 addition & 19 deletions sample-extension/app.config.yaml → ...n-ui-sdk/menu/custom-menu/app.config.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extensions:
web: web-src
runtimeManifest:
packages:
SampleExtension:
CustomMenu:
license: Apache-2.0
actions:
commerce-rest-get:
Expand All @@ -25,21 +25,3 @@ extensions:
annotations:
require-adobe-auth: false
final: true
get-order-grid-columns:
function: actions/data/orderGridColumns.js
web: 'yes'
runtime: 'nodejs:16'
inputs:
LOG_LEVEL: debug
annotations:
require-adobe-auth: false
final: true
get-product-grid-columns:
function: actions/data/productGridColumns.js
web: 'yes'
runtime: 'nodejs:16'
inputs:
LOG_LEVEL: debug
annotations:
require-adobe-auth: false
final: true
8 changes: 8 additions & 0 deletions admin-ui-sdk/menu/custom-menu/extension-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "custommenu",
"displayName": "Adobe Commerce custom menu",
"description": "Adobe Commerce custom menu example in admin panel",
"platform": "web",
"id": "custommenu",
"version": "1.0.0"
}
File renamed without changes.
Loading

0 comments on commit 7155ad5

Please sign in to comment.