=== Webifysys Quantity and Pricing Tiers for WooCommerce ===
Contributors: Webifysys
Tags: woocommerce, product rules, quantity limits, bulk pricing, analytics
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.txt

Advanced WooCommerce quantity control with min/max rules, pricing tiers, and local notifications. Ideal for wholesale and B2B web stores.

== Description ==

**Webifysys Quantity and Pricing Tiers for WooCommerce** is the solution for controlling product quantities in your WooCommerce store. Set minimum and maximum purchase limits, enforce step increments, create dynamic pricing tiers, and track customer behavior with built-in analytics.

=== 🚀 Key Features ===

**Quantity Rules**
* Define **step/increment values** (e.g., buy in multiples of 6, 12, 24)
* Create **category-level rules** for product groups
* Support for **simple, variable, and grouped products**

**Cart-Level Controls**
* Enforce **minimum/maximum cart quantity** (total items)
* Set **minimum/maximum cart total** (monetary value)
* Option to **include or exclude taxes** in calculations
* **Block checkout** when rules are violated

**Pricing Tiers (Bulk Discounts)**
* Create **quantity-based pricing tiers** (e.g., 10-49 units: 10% off, 50+: 20% off)
* Support for **percentage or fixed discounts**
* Display **pricing tables** on product pages
* Automatic price calculation in cart
* Works with **variable products and variations**

**Custom Quantity Selectors**
* **4 modern quantity selector styles**: Default, Plus/Minus, Dropdown, Buttons
* Mobile-responsive designs
* Automatic min/max/step enforcement

**Analytics & Reporting**
* Track **violation statistics** by product and type
* View **top products with violations**
* Analyze **violation trends** over time
* **Automatic data retention** management
* Export-ready data for further analysis

**Notifications & Alerts**
* **Email notifications** when violation thresholds are reached
* **Webhook integration** for external systems
* **High-value order alerts** when expensive carts are blocked
* Configurable notification thresholds

**User Role Restrictions**
* Apply different rules based on **user roles**
* **Guest user restrictions**
* **Member-only quantity limits**

**Enhanced User Experience**
* **Customizable error messages** with template variables
* **Helpful suggestions** (e.g., "Add 3 more to meet minimum")
* **Visual limit indicators** on product pages
* **Real-time validation** on product and cart pages
* **Translation-ready** with .pot file included

**Developer-Friendly**
* Clean, well-documented code
* **HPOS (High-Performance Order Storage) compatible**
* Follows WordPress and WooCommerce coding standards


== Installation ==

= Manual Installation =

1. Download the plugin ZIP file
2. Upload to `/wp-content/plugins/webifysys-quantity-pricing-tiers-woocommerce/`
3. Activate through the **Plugins** menu in WordPress

= Configuration =

1. Go to **WooCommerce → Settings → Flexible Quantity and Price Rules**
2. Configure your global settings in the **General Settings** section
3. Set up category rules, pricing tiers, and exclusions as needed
4. Optionally enable analytics and notifications in **Advanced Settings**

== Frequently Asked Questions ==

= Can I set different rules for different products? =

Yes! You can set unique rules on individual products or variations. Go to the product edit page and scroll to the "Min/Max Quantity Rules" section.

= Does this work with variable products? =

Absolutely. You can set rules for the parent product (applies to all variations) or set unique rules for each individual variation.

= Can I create bulk pricing discounts? =

Yes! Use the **Pricing Tiers** section to create quantity-based discounts. For example: 1-9 units at regular price, 10-49 units at 10% off, 50+ units at 20% off.

= What happens when a customer violates a rule? =

The plugin displays a user-friendly error message explaining the issue and prevents checkout. You can customize these messages in the Advanced Settings.

= Can I exclude certain products from rules? =

Yes. Use the **Rules Exclusion** section to exclude specific products or entire categories from min, max, step, or all rules.

= Does this plugin track analytics? =

Yes! The built-in analytics dashboard tracks violation statistics, top products with violations, and trends over time. You can also receive email or webhook notifications.

= Is this compatible with WooCommerce HPOS? =

Yes, the plugin is fully compatible with WooCommerce High-Performance Order Storage (HPOS).

= Can I customize the quantity selector design? =

Yes! Choose from 4 modern quantity selector styles to match your theme.

= Will this slow down my site? =

No. The plugin is optimized for performance with efficient database queries and minimal frontend JavaScript.



== Changelog ==

= 1.0.0 - 2026-09-30 =

**Initial Release**

== Upgrade Notice ==

= 1.0.0 =
Initial stable release with comprehensive quantity control, pricing tiers, analytics, and notifications.

== Privacy Policy ==

This plugin does not collect or transmit any personal data outside your WordPress installation. All analytics data is stored locally in your database.

If you enable webhook notifications, violation data will be sent to the configured webhook URL. You are responsible for ensuring compliance with privacy regulations.


== License ==

This plugin is licensed under the GPLv2 or later.

Copyright (C) 2025 Webifysys

