0.0.5 • Published 6 months ago
@devx-commerce/banners v0.0.5
@devx-commerce/banners by devx commerce
Medusa Banner Plugin
A plugin for Medusa e-commerce platforms that enables management of banners throughout the storefront.
Overview
The Banner Plugin allows store administrators to create and manage different types of banners across the storefront. Banners can be customized with titles, descriptions, CTAs, links, media, and styling options.
Features
- Create and manage various banner types:
- Hero section banners
- Menu banners
- Mini banners
- Assign banners to different sections of the website
- Customize banner content:
- Title and subtitle
- Description
- Call-to-action button and link
- Background and text colors
- Media (separate options for web and mobile)
- Set banner status (draft/published)
- Integrate with Medusa Admin UI
- REST API endpoints for both admin and store
Requirements
- Medusa Server (v2.4.0 or higher)
- Node.js (v20 or higher)
- PostgreSQL
Installation
# Using npm
npm install @devx-commerce/banners
# Using yarn
yarn add @devx-commerce/bannersConfiguration
Add the plugin to your medusa-config.js file:
const plugins = [
// ... other plugins
{
resolve: "@devx-commerce/banners",
options: {},
},
];Banner Properties
Each banner has the following properties:
id: Unique identifier (prefixed with "ban")title: Main banner headingsubtitle: Secondary banner textlink: URL for banner redirectionctaTitle: Call-to-action button textdescription: Detailed banner textbannerVariant: Type of banner (HERO_SECTION_BANNER, MENU_BANNER, MINI_BANNER)module: Section of website (HOME, CONTACT, ABOUT, STORE, REVIEWS)section: Custom section identifierwebsiteMedia: Media URL for desktop displaymobileMedia: Media URL for mobile displaybgColor: Background colortextColor: Text colorstatus: Current banner status (DRAFT, PUBLISHED)
API Endpoints
Admin Endpoints
GET /admin/banners: List all banners (with filtering and pagination)POST /admin/banners: Create a new bannerGET /admin/banners/:id: Get a specific bannerPUT /admin/banners/:id: Update a bannerDELETE /admin/banners/:id: Delete a banner
Store Endpoints
GET /store/banners: Get published banners for display in the storefront
Development
# Start development server
yarn dev
# Build the plugin
yarn buildLicense
MIT
Made with Medusa
0.0.5
6 months ago
0.0.2-beta.6
6 months ago
0.0.2-beta.5
6 months ago
0.0.4
7 months ago
0.0.2-beta.4
8 months ago
0.0.3
8 months ago
0.0.2-beta.3
8 months ago
0.0.2-beta.2
8 months ago
0.0.2
8 months ago
0.0.2-beta.1
8 months ago
0.0.1
8 months ago