Safari Sun Configurator
A powerful WordPress/WooCommerce plugin that enables customers to customize products with decoration methods, placement locations, and dynamic pricing based on quantity and decoration options.
by Selman Demirdoven · github.com/demirdoven/safarisun-product-configurator · 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/demirdoven/safarisun-product-configurator/archive/refs/heads/main.zipReadme
Safari Sun Configurator
A powerful WordPress/WooCommerce plugin that enables customers to customize products with decoration methods, placement locations, and dynamic pricing based on quantity and decoration options.
Overview
Safari Sun Configurator is a comprehensive product customization plugin designed specifically for WooCommerce stores that need to offer personalized decoration options on their products. This plugin streamlines the process of configuring products with various decoration methods, managing pricing rules, and providing an intuitive configurator interface for customers.
Features
Core Functionality
- Product Customization: Allow customers to configure products with multiple decoration methods and placement options
- Decoration Methods Management: Create and manage different decoration techniques (e.g., embroidery, screen printing, custom designs)
- Location-Based Decoration: Define specific placement locations on products with visual icons
- Dynamic Pricing: Set quantity-based pricing rules for different decoration options
- Markup Groups: Create grouped markup pricing for bulk orders
Admin Features
-
Custom Post Types:
- Decoration Methods
- Decoration Method Options
- Locations
- Markup Groups
-
Meta Boxes: Streamlined interfaces for connecting products with decoration options, locations, and pricing rules
-
Price Rules Management: Comprehensive admin interface for managing quantity-based pricing rules
-
Icon Management: Associate icons with decoration methods and locations
-
Flexible Taxonomy: Location Groups taxonomy for organizing locations hierarchically
Frontend Features
- Interactive Configurator: Clean, intuitive UI for customers to select decoration methods and placement
- Real-time Updates: Dynamic updates as customers configure their products
- Visual Feedback: Icons and visual representations of decoration options
- Stock Status Handling: Automatic detection of out-of-stock items with appropriate messaging
Installation
Requirements
- WordPress 5.0+
- WooCommerce 3.5+
- PHP 7.2+
- jQuery (included with WordPress)
- Select2 library (for enhanced dropdowns)
Installation Steps
- Upload the
safari-sun-configuratorfolder to/wp-content/plugins/ - Activate the plugin through the WordPress admin dashboard
- Navigate to Product Configurator in the admin menu to set up decoration methods and pricing rules
Plugin Structure
safari-sun-configurator/
├── safari-sun-configurator.php # Main plugin file
├── assets/
│ ├── css/
│ │ ├── style.css # Frontend styles
│ │ ├── admin-style.css # Admin styles
│ │ └── style__backup.css # Backup CSS
│ ├── js/
│ │ ├── scripts.js # Frontend JavaScript
│ │ └── admin-scripts.js # Admin JavaScript
│ └── images/
└── README.md
Usage
Setting Up Decoration Methods
- Go to Admin Dashboard → Product Configurator → Decoration Methods
- Create a new decoration method (e.g., "Embroidery", "Screen Printing")
- Upload an icon/image for the method
- Publish
Creating Decoration Options
- Navigate to Product Configurator → Decoration Options
- Create individual options within a decoration method
- Each option must be linked to a parent Decoration Method
- Add menu order to control display sequence
Managing Locations
- Go to Product Configurator → All Locations
- Create locations where decorations can be placed (e.g., "Front Chest", "Back", "Sleeve")
- Upload icon images for each location
- Use the Locations taxonomy to group them
Setting Up Markup Groups
- Navigate to Product Configurator → Markup Groups
- Create a markup group with quantity-based pricing rules:
- Min. Qty: Minimum quantity for this pricing tier
- Max. Qty: Maximum quantity for this pricing tier
- Amount: Price markup for this tier
Connecting Products to Configurator
- Edit a WooCommerce product (must be Variable type)
- In the product meta boxes (right sidebar), configure:
- Decoration Methods: Select which decoration methods are available
- Location Options: Choose the location group for this product
- Markup Options: Assign the markup group for pricing
Price Rules Management
- Go to Product Configurator → Price Rules
- Define global pricing rules:
- Decoration Method: Select method
- Decoration Option: Select specific option
- Min/Max Qty: Quantity range
- Price: Additional cost for this configuration
Admin Menus
- Product Configurator (Main Menu)
- Decoration Methods
- Decoration Options
- All Locations
- Markup Groups
- Price Rules
Custom Post Types
Decoration Method
- Slug:
decoration_method - Supports: Title, Featured Image
- Hierarchical: No
Decoration Method Option
- Slug:
d_method_option - Supports: Title, Featured Image
- Hierarchical: No
- Related Meta:
dec_method_id(parent method ID)
Location
- Slug:
location - Supports: Title, Featured Image
- Hierarchical: No
- Taxonomy: locations (Location Groups)
Markup Group
- Slug:
markup_group - Supports: Title
- Hierarchical: No
- Related Meta:
markups(pricing tiers array)
Taxonomies
Locations
- Name: Location Groups
- Hierarchical: Yes
- Used with: Location post type
- Slug:
loc
Database Meta Keys
| Meta Key | Post Type | Description |
|---|---|---|
dec_method_id |
d_method_option, location | Parent decoration method ID |
decorations |
product | Comma-separated decoration method IDs |
markup_group |
product | Selected markup group ID |
location_group |
product | Selected location group term ID |
markups |
markup_group | Array of pricing tiers |
locations |
location_group | Array of location definitions |
Hooks & Filters
Actions
wp_enqueue_scripts→ssc_styles_front_header- Frontend CSS/JS loadingadmin_enqueue_scripts→ssc_styles_admin_header- Admin CSS/JS loadinginit→ssc_cpt- Register custom post typesinit→ssc_cpt_tax- Register taxonomiesadd_meta_boxes→ssc_mbs- Register meta boxessave_post→ssc_save_cpt_fields- Save custom field dataadmin_menu→ssc_admin_menus- Register admin menuswp_ajax_*→ Multiple AJAX handlers for dynamic functionality
Filters
manage_*_posts_columns- Customize admin columnsdo_meta_boxes- Reorganize meta box placement
AJAX Endpoints
ssc_get_variation_info- Get product variationsssc_save_groups_repeater- Save repeatable field datassc_save_price_rules- Save price rulesssc_get_related_mth_options- Get options for a decoration methodssc_get_related_mth_by_opt- Get method by option
Dependencies
JavaScript Libraries
- jQuery: Core jQuery library
- Select2: Enhanced dropdowns for multi-select inputs
- SweetAlert2: Beautiful alert dialogs for user feedback
CSS Framework
- FontAwesome Icons: For UI icons
Configuration
Constants
SS_CONF_PLUGIN_URL- Plugin directory URLSS_CONF_PLUGIN_DIR- Plugin directory path
Important Settings
- Only Variable Products support the configurator
- Products must have all three settings configured:
- Decoration Methods selected
- Location Group assigned
- Markup Group assigned
Styling
The plugin provides pre-styled components but allows customization:
- Frontend:
assets/css/style.css - Admin:
assets/css/admin-style.css
Key CSS Classes
.configurator_wrapper- Main container.configurator_block- Configuration block.configurator_steps- Step list.conf_step- Individual step.configurator_buttons- Button group
Development Notes
Version
1.0.0
Author
Selman Demirdoven
Author URL
Security
- Uses WordPress nonces for form verification
- Implements
wp_verify_nonce()for AJAX requests - Uses WordPress meta operations for data saving
Troubleshooting
Configurator Not Showing
- Verify product is a Variable product
- Ensure Decoration Methods, Location Group, and Markup Group are assigned to product
- Check that product has "In Stock" status
Pricing Issues
- Verify Price Rules are configured in admin
- Check Markup Group is assigned to product
- Ensure quantity ranges don't overlap in rules
Display Issues
- Clear WordPress cache if using caching plugin
- Verify CSS/JS files are loading (check browser console)
- Ensure Select2 library is properly loaded
Support
For issues, feature requests, or contributions, visit: https://github.com/demirdoven
License
This plugin is proprietary software for Safari Sun. All rights reserved.
Changelog
Version 1.0.0
- Initial release
- Core configurator functionality
- Admin interface for managing decoration methods
- Price rules system
- Location-based decoration support
Note: This plugin requires WooCommerce to be installed and activated. It's specifically designed for handling complex product customization workflows.