WP Manifestindependent plugin directory
manifest / ecommerce / safarisun-product-configurator

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

0stars
0forks

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.zip

Readme

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

  1. Upload the safari-sun-configurator folder to /wp-content/plugins/
  2. Activate the plugin through the WordPress admin dashboard
  3. 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

  1. Go to Admin DashboardProduct ConfiguratorDecoration Methods
  2. Create a new decoration method (e.g., "Embroidery", "Screen Printing")
  3. Upload an icon/image for the method
  4. Publish

Creating Decoration Options

  1. Navigate to Product ConfiguratorDecoration Options
  2. Create individual options within a decoration method
  3. Each option must be linked to a parent Decoration Method
  4. Add menu order to control display sequence

Managing Locations

  1. Go to Product ConfiguratorAll Locations
  2. Create locations where decorations can be placed (e.g., "Front Chest", "Back", "Sleeve")
  3. Upload icon images for each location
  4. Use the Locations taxonomy to group them

Setting Up Markup Groups

  1. Navigate to Product ConfiguratorMarkup Groups
  2. 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

  1. Edit a WooCommerce product (must be Variable type)
  2. 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

  1. Go to Product ConfiguratorPrice Rules
  2. 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_scriptsssc_styles_front_header - Frontend CSS/JS loading
  • admin_enqueue_scriptsssc_styles_admin_header - Admin CSS/JS loading
  • initssc_cpt - Register custom post types
  • initssc_cpt_tax - Register taxonomies
  • add_meta_boxesssc_mbs - Register meta boxes
  • save_postssc_save_cpt_fields - Save custom field data
  • admin_menussc_admin_menus - Register admin menus
  • wp_ajax_* → Multiple AJAX handlers for dynamic functionality

Filters

  • manage_*_posts_columns - Customize admin columns
  • do_meta_boxes - Reorganize meta box placement

AJAX Endpoints

  • ssc_get_variation_info - Get product variations
  • ssc_save_groups_repeater - Save repeatable field data
  • ssc_save_price_rules - Save price rules
  • ssc_get_related_mth_options - Get options for a decoration method
  • ssc_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 URL
  • SS_CONF_PLUGIN_DIR - Plugin directory path

Important Settings

  • Only Variable Products support the configurator
  • Products must have all three settings configured:
    1. Decoration Methods selected
    2. Location Group assigned
    3. 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

https://github.com/demirdoven

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.

Read the full README on GitHub →