مدیریت خدمات پس از فروش
WordPress plugin for after-sale service management (warranty, repair, serial numbers)
by Your Name · github.com/blindmagnet/aftersale-service · 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/blindmagnet/aftersale-service/archive/refs/heads/main.zipReadme
After-Sale Service Manager — مدیریت خدمات پس از فروش
A complete after-sale service management system for WordPress — covering product serial registration, installation requests, warranty tracking, repair management, service history, and automated SMS notifications via FaraPayamak.
افزونهای جامع برای مدیریت گارانتی، نصب، تعمیر و سابقه خدمات محصولات، با ارسال پیامک خودکار از طریق فراپیامک.
Features / ویژگیها
- Serial Number Management — Register product serials with model info and availability status (
available,installed,blocked) - Installation Requests — Customers submit installation requests via shortcode; admin approves and records technician info
- Warranty Tracking — Automatic warranty start/end date calculation (default 18 months); Jalali date display
- Repair Requests — Customers report issues; admin tracks status through
pending → in_progress → completed - Service History — Full per-product history: installations, repairs, part replacements, periodic services
- Automated SMS (FaraPayamak) — Pattern-based SMS on installation request, completion, repair request, and status updates
- SMS Log — All outgoing messages stored with status and provider response
- Customer Dashboard — Single shortcode exposes a full customer portal (warranty check, request forms, history)
- OOP Architecture — Clean class-per-concern structure with a singleton root class
- 5 Custom DB Tables — Dedicated tables with proper indexes, created via
dbDeltaon activation
Shortcodes
| Shortcode | Description |
|---|---|
[ass_installation_form] |
Installation request form |
[ass_warranty_check] |
Warranty lookup by serial number |
[ass_repair_form] |
Repair request form |
[ass_service_history] |
Service history lookup |
[ass_customer_dashboard] |
Full customer portal (all of the above) |
Installation
- Upload the
aftersale-servicefolder to/wp-content/plugins/ - Activate the plugin from Plugins → Installed Plugins
- Go to After-Sale Service → SMS Settings and enter your FaraPayamak credentials
- Place shortcodes on the desired pages
Configuration
SMS (FaraPayamak)
Navigate to After-Sale Service → SMS Settings in the WordPress admin.
| Field | Description |
|---|---|
| Username | Your FaraPayamak account username |
| Password | Your FaraPayamak account password |
| Enabled | Toggle SMS sending on/off |
Pattern IDs — Register these patterns in your FaraPayamak panel and update the PATTERN_* constants in includes/class-sms.php:
| Constant | Pattern Variables |
|---|---|
PATTERN_INSTALLATION_REQUEST |
{0} name, {1} model, {2} serial, {3} tracking code |
PATTERN_INSTALLATION_COMPLETE |
{0} model, {1} warranty end date |
PATTERN_REPAIR_REQUEST |
{0} name, {1} model, {2} tracking code |
PATTERN_STATUS_UPDATE |
{0} tracking code, {1} new status |
Database Schema
The plugin creates 5 tables with the wp_ass_ prefix:
| Table | Purpose |
|---|---|
ass_serials |
Product serial numbers with model and status |
ass_installations |
Installation requests + warranty info |
ass_repairs |
Repair requests and technician notes |
ass_service_history |
Full service log per serial |
ass_sms_log |
Outgoing SMS audit trail |
File Structure
aftersale-service/
├── aftersale-service.php ← Plugin root, singleton bootstrap
├── includes/
│ ├── class-database.php ← Table creation via dbDelta
│ ├── class-serial.php ← Serial CRUD
│ ├── class-installation.php ← Installation requests
│ ├── class-warranty.php ← Warranty calculation & Jalali dates
│ ├── class-repair.php ← Repair requests
│ ├── class-service-history.php ← Service log
│ ├── class-sms.php ← FaraPayamak integration
│ ├── class-admin.php ← Admin menus, pages, settings
│ ├── class-public.php ← Frontend asset enqueuing
│ ├── class-ajax.php ← AJAX handlers (nonce-protected)
│ └── class-shortcodes.php ← Shortcode registration
├── admin/css/ & admin/js/
├── public/css/ & public/js/
├── templates/admin/ & templates/public/
└── languages/ ← i18n ready (text domain: aftersale-service)
Requirements
- WordPress 5.8+
- PHP 7.4+
- MySQL 5.6+ / MariaDB 10.1+
- cURL extension (for SMS)
Changelog
1.0.0
- Initial release
- Serial, installation, warranty, repair, and service history modules
- FaraPayamak SMS integration with pattern-based messages
- 5 customer-facing shortcodes
- Full admin panel with dashboard, lists, and detail views
License
Licensed under GPLv2 or later.
Author
Ghazale — Freelance WordPress & WooCommerce Developer
GitHub