You've already forked wc-tier-and-package-prices
Update documentation to v1.1.20 with current features
- Updated all version references to 1.1.20 - Updated WordPress requirement to 6.0+ (tested up to 6.9.x) - Updated WooCommerce requirement to 8.0+ (tested up to 10.x) - Added comprehensive file structure showing Twig templates - Added WooCommerce Blocks compatibility documentation - Added tier labels feature documentation (v1.1.7) - Added quantity restrictions feature documentation (v1.1.0) - Added new usage examples for tier labels and quantity restrictions - Updated INSTALLATION.md with complete directory structure - Updated README.md with current version changelog - Updated QUICKSTART.md with 8 pro tips including new features - Updated USAGE_EXAMPLES.md with 6 complete examples - Documented WooCommerce Blocks support and v1.1.20 critical fix 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Usage Examples
|
||||
|
||||
**Plugin Version:** 1.1.20
|
||||
**Last Updated:** 2025-12-23
|
||||
|
||||
## Example 1: T-Shirt Store with Volume Discounts
|
||||
|
||||
### Tier Pricing Setup
|
||||
@@ -16,9 +19,9 @@ For a t-shirt that normally costs $20:
|
||||
**How to configure:**
|
||||
1. Edit your t-shirt product
|
||||
2. Set regular price to $20.00
|
||||
3. Add tier: Min Qty = 10, Price = $18.00
|
||||
4. Add tier: Min Qty = 25, Price = $16.00
|
||||
5. Add tier: Min Qty = 50, Price = $14.00
|
||||
3. Add tier: Min Qty = 10, Price = $18.00, Label = "Bulk Discount"
|
||||
4. Add tier: Min Qty = 25, Price = $16.00, Label = "Volume Pricing"
|
||||
5. Add tier: Min Qty = 50, Price = $14.00, Label = "Wholesale Rate"
|
||||
6. Save product
|
||||
|
||||
**Customer experience:**
|
||||
@@ -97,6 +100,62 @@ Regular mug price: $10.00
|
||||
- Package 2: Qty = 4, Price = $32.00, Label = "Family Set"
|
||||
- Package 3: Qty = 10, Price = $70.00, Label = "Office Bundle"
|
||||
|
||||
## Example 5: Quantity Restrictions (New in v1.1.0)
|
||||
|
||||
### Party Supplies with Fixed Packages
|
||||
|
||||
For products that should ONLY be sold in specific package quantities:
|
||||
|
||||
**Product:** Balloons - Regular price $1.00 each
|
||||
|
||||
**Package Configuration:**
|
||||
- Package 1: Qty = 12, Price = $10.00, Label = "Dozen Pack"
|
||||
- Package 2: Qty = 24, Price = $18.00, Label = "Party Pack"
|
||||
- Package 3: Qty = 50, Price = $40.00, Label = "Event Pack"
|
||||
|
||||
**How to configure:**
|
||||
1. Edit balloon product
|
||||
2. Set regular price to $1.00
|
||||
3. Add packages as shown above
|
||||
4. **Check "Restrict to package quantities only"** (per-product setting)
|
||||
5. Save product
|
||||
|
||||
**Customer experience:**
|
||||
- Quantity input field is hidden on product page
|
||||
- Customer MUST select a package using the package selection buttons
|
||||
- Attempting to add custom quantities via URL or API will fail with validation error
|
||||
- Cart displays selected package quantity (cannot be edited)
|
||||
- "View Options" button appears on shop/category pages instead of "Add to Cart"
|
||||
|
||||
**When to use quantity restrictions:**
|
||||
- Pre-packaged items (dozen eggs, 6-pack drinks, etc.)
|
||||
- Products with fixed manufacturing quantities
|
||||
- Promotional bundles where you don't want individual sales
|
||||
- Subscription boxes with specific item counts
|
||||
|
||||
## Example 6: Tier Labels for Enhanced UX (New in v1.1.7)
|
||||
|
||||
### Office Supplies with Clickable Tiers
|
||||
|
||||
**Product:** Premium Notebooks - Regular price $8.00 each
|
||||
|
||||
**Tier Configuration with Labels:**
|
||||
- Tier 1: Min Qty = 5, Price = $7.50, Label = "Small Business Discount"
|
||||
- Tier 2: Min Qty = 10, Price = $7.00, Label = "Wholesale Pricing"
|
||||
- Tier 3: Min Qty = 25, Price = $6.50, Label = "Corporate Rate"
|
||||
|
||||
**Customer experience:**
|
||||
- Tier labels appear below quantity in pricing table (italicized)
|
||||
- Clicking a tier row auto-fills the quantity field with that tier's minimum quantity
|
||||
- Smooth scroll animation highlights the quantity field
|
||||
- Add to Cart button automatically disables when quantity is 0 or invalid
|
||||
|
||||
**Benefits of tier labels:**
|
||||
- Helps customers understand pricing context
|
||||
- Makes tiers more appealing with descriptive names
|
||||
- Improves conversion by highlighting value propositions
|
||||
- Clickable rows improve user experience
|
||||
|
||||
## Tips for Best Results
|
||||
|
||||
### Tier Pricing Best Practices
|
||||
@@ -113,6 +172,11 @@ Regular mug price: $10.00
|
||||
- Minimum 5-10% per tier level
|
||||
- Higher tiers should have progressively better deals
|
||||
|
||||
4. **Use Labels** (v1.1.7+): Add descriptive labels to tiers
|
||||
- "Wholesale Price" instead of just showing the number
|
||||
- "Bulk Discount", "Volume Pricing", "Corporate Rate"
|
||||
- Makes pricing more professional and appealing
|
||||
|
||||
### Package Pricing Best Practices
|
||||
|
||||
1. **Strategic Quantities**: Match common use cases
|
||||
@@ -169,3 +233,32 @@ Regular mug price: $10.00
|
||||
- Package 2: Medium party (25 pieces) = $110
|
||||
- Package 3: Large party (50 pieces) = $200
|
||||
- Package 4: Event package (100 pieces) = $350
|
||||
|
||||
## WooCommerce Blocks Compatibility (v1.1.4+, Fixed in v1.1.20)
|
||||
|
||||
This plugin is **fully compatible** with WooCommerce block-based cart and checkout:
|
||||
|
||||
### Supported Block Types
|
||||
- Cart Block (`woocommerce/cart`)
|
||||
- Mini Cart Block (`woocommerce/mini-cart`)
|
||||
- Checkout Block (`woocommerce/checkout`)
|
||||
- All Store API endpoints
|
||||
|
||||
### Block-Specific Features
|
||||
- Quantity restrictions work in block-based carts
|
||||
- Package-restricted products hide quantity selectors in blocks
|
||||
- Tier and package pricing applies correctly in block checkout
|
||||
- Mini cart displays correct prices and restrictions
|
||||
|
||||
### Technical Notes
|
||||
- v1.1.20 fixed critical fatal error in WooCommerce Blocks
|
||||
- Uses `woocommerce_store_api_product_quantity_editable` filter
|
||||
- Works with both classic and block-based themes
|
||||
- No configuration needed - blocks work automatically
|
||||
|
||||
### Testing Your Block Setup
|
||||
1. Add block-based cart to a page (`/cart`)
|
||||
2. Add mini-cart block to your header
|
||||
3. Add block-based checkout to a page (`/checkout`)
|
||||
4. Test tier pricing, package pricing, and quantity restrictions
|
||||
5. Verify prices calculate correctly at checkout
|
||||
|
||||
Reference in New Issue
Block a user