ConsuCorner Medical Products Manager
A robust WordPress plugin for managing medical products with hierarchical classification, dynamic form fields, and n8n webhook integration.
by ConsuCorner Dev Team · github.com/bassiouny2/consucorner-medical-products-manager · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/bassiouny2/consucorner-medical-products-manager/archive/refs/heads/main.zipA robust WordPress plugin for managing medical products with hierarchical classification, dynamic form fields, and n8n webhook integration.
Features
- Hierarchical Classification: Specialty -> Category -> Tool Type -> Sub-Type.
- Dynamic Forms: Multi-step forms with validation and conditional classification selects.
- Product Management: CRUD operations for medical products.
- Form Builder: Create custom fields per step (including select/radio/checkbox list and image upload).
- Product Details: Admin details view shows all fields + custom fields + full debug/audit tracking.
- Audit & Tracking: Stores submission identity/context/event timeline for investigation and compliance.
- n8n Integration: Webhook triggers for product creation and updates.
- Frontend Shortcodes:
[cmp_product_form]and[cmp_products_list]. - Security: Nonces, sanitization, and capability checks.
- Performance: Optimized database schema.
Dashboard Pages
- Medical Products → Dashboard: Overview.
- Medical Products → All Products: List all submissions. Click a product name to open Product Details.
- Medical Products → Add New: Multi-step product form in the dashboard.
- Medical Products → Form Builder: Add/edit/enable/disable custom fields per step.
- Medical Products → How to Use: Built-in documentation page (recommended starting point).
- Medical Products → Settings: Plugin settings and integrations.
Installation
- Upload the plugin files to the
/wp-content/plugins/consucorner-medical-productsdirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the 'Plugins' screen in WordPress.
- Navigate to "Medical Products" in the admin menu.
Shortcodes
[cmp_product_form]
Displays the product submission form on the frontend.
Attributes:
redirect_url(optional): URL to redirect after successful submission.user_role(optional): Restrict access to specific user roles (e.g.,subscriber).
Example: [cmp_product_form user_role="subscriber"]
[cmp_products_list]
Displays a grid of recent products.
Attributes:
limit(optional): Number of products to display (default: 10).
Example: [cmp_products_list limit="20"]
Form Builder (Custom Fields)
Form Builder lets admins add custom fields to the multi-step form without code changes.
Supported types:
- Text, Textarea, Number, Email, URL, Date
- Select (Dropdown), Radio (Single choice), Multi-select (Checkbox list)
- Checkbox (Yes/No)
- Image Upload (stored in WordPress Media Library)
Custom field storage:
- Text-like fields stored in product meta as
custom_<field_key> - Images stored as attachment id in product meta as
custom_image_<field_key>
Product Details (Admin)
The Product Details page shows:
- Core record fields (from
wp_cmp_products) - Standard meta fields (from
wp_cmp_product_meta) - Custom fields (Form Builder)
- Debug / Tracking (identity + request context + client event timeline)
n8n Integration
Webhooks can be configured in the database (wp_cmp_webhooks table). Supported events:
product_createdproduct_updatedproduct_deleted(coming soon)stock_low(coming soon)
Developer Notes
- Database Schema: The plugin creates custom tables upon activation (products, meta, webhooks, form fields, etc.).
- Classification Data: Stored in
includes/data/classification-data.json. - Docs: See
docs/for admin usage, audit/tracking fields, and developer notes.
License
GPLv2 or later