Skip to content

ashawkat/mix-match-bundle-for-woocommerce

Repository files navigation

🎁 Mix & Match Bundle for WooCommerce

Version WordPress Plugin Version WooCommerce Version PHP Version License HPOS Compatible

Create customizable product bundles with tiered quantity discounts, advanced analytics, and comprehensive reporting. Increase AOV with a beautiful bundle builder and real-time discount calculations.

Mix & Match Bundle


📖 Table of Contents


✨ Features

📊 Analytics & Reporting ✨ NEW in 1.0.2!

  • Comprehensive Dashboard - Beautiful analytics interface with Chart.js visualizations
  • Coupon Tracking - Monitor created, used, unused, and abandoned coupons
  • Bundle Performance - Track bundle popularity and usage trends
  • Revenue Analytics - View purchase history and revenue over time
  • Cart Conversion - Analyze cart and checkout conversion rates
  • Date Filtering - Last 7 days, 30 days, This Month, Last Month, Quarter, Custom Range
  • CSV Export - Export all analytics data for external analysis
  • Real-Time Updates - Live data visualization as orders come in

⚙️ Settings & Diagnostics ✨ NEW in 1.0.2!

  • Settings Page - Control logging and plugin behavior
  • WooCommerce Logger Integration - Debug logging with settings toggle
  • Diagnostics Tools - System info, database checks, file permissions
  • Enhanced Error Tracking - Better debugging with categorized logs

🎯 Core Features

  • Unlimited Bundles - Create as many bundles as needed with unique configurations
  • Tiered Discounts - Set quantity-based discount tiers (e.g., buy 2 save 10%, buy 5 save 20%)
  • Drag-and-Drop Product Ordering - Visually reorder products with intuitive drag-and-drop interface
  • Dual Bundle Modes
    • 📝 Selection Mode - Customers pick products with checkboxes
    • 🔢 Quantity Mode - Customers set quantities for each product
  • Variable Products - Full support with variation dropdown selection
  • Real-Time Calculations - Live price updates as customers build bundles
  • Shortcode Integration - [mmb_bundle id="X"] - Place bundles anywhere
  • Guest Checkout Support - Works perfectly for logged-out users

🎨 Design & Customization

  • 5 Color Schemes - Primary, Button Text, Accent, Hover Background, Hover Accent
  • Custom Text - Modify all frontend text and labels
  • Visibility Controls - Show/hide title, description, headings, hints, progress
  • Progress Display - Visual tier progress with checkmark indicators
  • Responsive Design - Works flawlessly on all devices
  • Mobile Optimized - Sticky mobile cart footer for enhanced UX

🔌 Integrations

  • Sidecart Compatible - FunnelKit, WooCommerce Side Cart, and more
  • HPOS Ready - High-Performance Order Storage compatible
  • Theme Agnostic - Works with any properly coded WordPress theme
  • Translation Ready - 28 pre-configured language files included

🚀 Performance

  • Modern JavaScript - Vanilla JS (no jQuery dependencies)
  • Optimized CSS - CSS variables for lightning-fast customization
  • AJAX-Powered - Smooth, no-page-reload experience
  • Lightweight - Minimal footprint, maximum performance

🔒 Security

  • Nonce Verification - All AJAX requests protected
  • Data Sanitization - Input sanitization throughout
  • Output Escaping - XSS protection on all outputs
  • WPCS Compliant - WordPress Coding Standards

🎥 Demo

Live Demo: https://demo.betatech.co/mix-match-bundle


💾 Installation

From WordPress.org (Recommended)

  1. Log into your WordPress admin panel
  2. Navigate to PluginsAdd New
  3. Search for "Mix & Match Bundle"
  4. Click Install NowActivate
  5. Go to Mix & Match in the admin menu

From GitHub

cd wp-content/plugins/
git clone https://github.com/ashawkat/mix-match-bundle-for-woocommerce

Then activate from WordPress admin → Plugins.

Manual Upload

  1. Download the latest release
  2. Upload ZIP via PluginsAdd NewUpload Plugin
  3. Activate and start creating bundles!

🚀 Usage

Quick Start (5 Minutes)

  1. Navigate to Mix & Match in WordPress admin
  2. Create a new bundle or edit inline
  3. Name your bundle (e.g., "Build Your Box")
  4. Select Products - Search and choose products to include
  5. Reorder Products - ✨ NEW! Drag and drop to set the display order
  6. Add Tiers - Set quantity and discount (e.g., 2 items = 10% off)
  7. Customize - Colors, text, visibility (optional)
  8. Save and copy the shortcode
  9. Add shortcode to any page: [mmb_bundle id="1"]
  10. Preview and test your bundle!

Shortcode

[mmb_bundle id="1"]

Parameters:

  • id (required) - The bundle ID

PHP Template Tag

<?php
if ( function_exists( 'mmb_display_bundle' ) ) {
    mmb_display_bundle( 1 ); // Bundle ID
}
?>


⚙️ Configuration

Bundle Settings

Setting Description Options
Name Bundle name displayed to customers Text
Description Optional bundle description Textarea
Mode Selection or Quantity mode Selection/Quantity
Products Products available in bundle Multi-select
Product Order NEW! Visual order for frontend display Drag & Drop
Discount Tiers Quantity-based discounts Unlimited tiers

✨ Product Ordering (NEW!)

Drag-and-Drop Interface:

  • Select products to see them in "Selected Products" section
  • Drag products up or down to reorder
  • Products display on frontend in your chosen order
  • Visual order numbers (1, 2, 3...) update in real-time
  • Quick remove button (✕) to deselect products
  • Order persists across edits and saves

Benefits:

  • ⭐ Feature best-selling products first
  • 📊 Order by price (high-to-low or low-to-high)
  • 🎯 Strategic placement for better conversions
  • 🔄 Easy reordering anytime by editing bundle
  • 💾 Order is saved with bundle automatically

Use Cases:

  • Put seasonal items first during promotions
  • Group complementary products together
  • Order by margin to maximize profit
  • Test different arrangements for A/B testing

Design Options

Option Description Default
Primary Color Main brand color #4caf50
Button Text Color Text color for buttons #ffffff
Accent Color Secondary accent #45a049
Hover BG Hover background #388e3c
Hover Accent Hover accent color #2e7d32

Text Customization

  • Heading Text (default: "Select Your Products Below")
  • Hint Text (default: "Bundle 2, 3, 4 or 5 items and watch the savings grow.")
  • Button Text (default: "Add Bundle to Cart")
  • Progress Text (default: "Your Savings Progress")

Visibility Options

  • ✅ Show/Hide Bundle Title
  • ✅ Show/Hide Bundle Description
  • ✅ Show/Hide Heading Text
  • ✅ Show/Hide Hint Text
  • ✅ Show/Hide Progress Text

Cart Behavior

  • Sidecart - Open sidecart popup (recommended)
  • Redirect - Redirect to cart page

🌍 Translation

Supported Languages (28)

The plugin includes pre-configured translation files for:

European: 🇫🇷 French, 🇩🇪 German, 🇪🇸 Spanish, 🇮🇹 Italian, 🇵🇹 Portuguese, 🇳🇱 Dutch, 🇵🇱 Polish, 🇸🇪 Swedish, 🇩🇰 Danish, 🇳🇴 Norwegian, 🇫🇮 Finnish, 🇬🇷 Greek, 🇷🇴 Romanian, 🇹🇷 Turkish

American: 🇲🇽 Spanish (Mexico), 🇧🇷 Portuguese (Brazil), 🇬🇧 English (UK)

Asian: 🇨🇳 Chinese (Simplified), 🇹🇼 Chinese (Traditional), 🇯🇵 Japanese, 🇰🇷 Korean, 🇮🇳 Hindi, 🇸🇦 Arabic, 🇹🇭 Thai, 🇻🇳 Vietnamese, 🇮🇩 Indonesian, 🇲🇾 Malay, 🇵🇭 Filipino

How to Translate

Using Poedit (Recommended)

  1. Download Poedit (free)
  2. Open languages/mix-match-bundle-{locale}.po
  3. Translate strings
  4. Save (auto-generates .mo file)
  5. Upload both files

Using Loco Translate Plugin

  1. Install Loco Translate from WordPress
  2. Go to Loco TranslatePlugins
  3. Select Mix & Match Bundle
  4. Translate online

Translation Files

languages/
├── mix-match-bundle.pot           # Template
├── mix-match-bundle-fr_FR.po      # French
├── mix-match-bundle-de_DE.po      # German
└── ... (26 more languages)

Text Domain: mix-match-bundle

Total Strings: 67


🛠️ Development

Requirements

  • WordPress 5.8+
  • WooCommerce 5.0+
  • PHP 7.4+
  • MySQL 5.6+ or MariaDB 10.0+

File Structure

mix-match-bundle/
├── admin/
│   └── bundle-editor.php          # Admin bundle editor
├── assets/
│   ├── css/
│   │   ├── admin.css               # Admin styles
│   │   └── frontend.css            # Frontend styles
│   ├── img/
│   │   └── mix-match-icon.svg      # Plugin icon
│   └── js/
│       ├── admin.js                # Admin JavaScript
│       └── frontend.js             # Frontend JavaScript
├── includes/
│   ├── class-bundle-manager.php    # Bundle CRUD operations
│   ├── class-cart.php              # Cart integration
│   ├── class-frontend.php          # Frontend display
│   ├── class-settings.php          # Settings management
│   └── class-shortcode.php         # Shortcode handler
├── languages/
│   ├── mix-match-bundle.pot        # Translation template
│   ├── mix-match-bundle-*.po       # 28 language files
│   └── README.md                   # Translation guide
├── templates/
│   └── bundle-display.php          # Frontend template
├── mix-match-bundle.php            # Main plugin file
├── readme.txt                      # WordPress.org readme
├── README.md                       # GitHub readme (this file)
├── uninstall.php                   # Cleanup on uninstall
└── TRANSLATION-SUMMARY.md          # Translation documentation

Tech Stack

Frontend:

  • Vanilla JavaScript (ES6+)
  • CSS3 with Custom Properties
  • Responsive Grid & Flexbox
  • AJAX for seamless UX

Backend:

  • PHP 7.4+ with OOP
  • WordPress & WooCommerce APIs
  • wpdb for database operations
  • WordPress Coding Standards

Database:

  • Custom table: {prefix}_mmb_bundles
  • WooCommerce session storage
  • No external dependencies

Coding Standards

This plugin follows:

Hooks & Filters

Actions:

do_action( 'mmb_before_bundle_display', $bundle_id );
do_action( 'mmb_after_bundle_display', $bundle_id );
do_action( 'mmb_bundle_saved', $bundle_id, $bundle_data );

Filters:

apply_filters( 'mmb_bundle_discount', $discount, $bundle_id, $quantity );
apply_filters( 'mmb_bundle_products', $products, $bundle_id );
apply_filters( 'mmb_cart_behavior', $behavior, $bundle_id );

Development Setup

# Clone repository
git clone https://github.com/betatech/mix-match-bundle.git

# Navigate to plugin directory
cd mix-match-bundle

# Install WordPress locally (if needed)
# Activate WooCommerce
# Activate Mix & Match Bundle
# Start developing!

Testing

Manual Testing:

  1. Create bundles with different configurations
  2. Test on multiple themes
  3. Test on desktop, tablet, mobile
  4. Test with variable products
  5. Test discount calculations
  6. Test cart integration

Browser Support:

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+
  • Mobile browsers (iOS Safari, Chrome Mobile)

❓ FAQ

Does this work with variable products?

Yes! The plugin fully supports WooCommerce variable products with dropdown variation selection.

Can I create multiple bundles?

Absolutely! Create unlimited bundles with different products and discount structures.

Is it mobile-friendly?

Yes! Fully responsive with a special sticky mobile cart footer for optimal mobile UX.

Does it work with my theme?

Yes! The plugin is designed to work with any properly coded WordPress theme.

Is it compatible with HPOS?

Yes! Fully compatible with WooCommerce High-Performance Order Storage.

Can I customize the design?

Yes! Customize 5 colors, all text, and control visibility of elements. Advanced CSS customization also supported.

How are discounts calculated?

Discounts are based on total quantity in the bundle. Reach a tier threshold to unlock that discount percentage.

Does it work with sidecart plugins?

Yes! Integrates with FunnelKit, WooCommerce Side Cart, and most theme-based sidecarts.


🆘 Support

Need Help?

Before Requesting Support

  1. ✅ Check FAQ above
  2. ✅ Review documentation
  3. ✅ Search existing issues
  4. ✅ Test with default theme
  5. ✅ Disable other plugins to check conflicts

Creating an Issue

When reporting bugs, please include:

  • WordPress version
  • WooCommerce version
  • PHP version
  • Active theme
  • Active plugins
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots/videos (if applicable)

🤝 Contributing

We welcome contributions from the community!

Ways to Contribute

  1. Report Bugs - GitHub Issues
  2. Request Features - GitHub Issues
  3. Submit Pull Requests - Fix bugs or add features
  4. Translate - Help localize the plugin
  5. Documentation - Improve docs and guides
  6. Spread the Word - Share with others!

Pull Request Process

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Coding Guidelines

  • Follow WordPress Coding Standards
  • Add inline documentation
  • Include translator comments for i18n strings
  • Write meaningful commit messages
  • Test thoroughly before submitting

📄 License

This plugin is licensed under the GPLv2 or later.

Mix & Match Bundle for WooCommerce
Copyright (C) 2024 Betatech

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Full license: http://www.gnu.org/licenses/gpl-2.0.html


👏 Credits

Development Team

Betatech - Building better eCommerce solutions

  • Adnan Shawkat - Lead Developer & Architect
  • Betatech Team - Design, Testing & Support

Special Thanks

  • WooCommerce Team - For the amazing eCommerce platform
  • WordPress Community - For continuous inspiration and support
  • Beta Testers - For valuable feedback and testing
  • Contributors - For translations and improvements
  • Users - For choosing our plugin!

Technologies


📊 Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests Downloads Rating


🔗 Links


🌟 Show Your Support

If you find this plugin helpful, please:

  • Star this repository
  • 🐛 Report bugs to help us improve
  • 💡 Suggest features you'd like to see
  • 🗣️ Tell others about the plugin

⬆ Back to Top

Made with ❤️ by Betatech

Building better eCommerce solutions, one plugin at a time.

About

Create customizable bundle promotions with tiered discounts based on quantity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published