Variable Products
Variable Products
Measurement Price Calculator fully supports WooCommerce variable products. You can enable or disable the calculator for each variation independently and override pricing settings per variation.
How it works
- Set up the measurement calculator on the parent product as usual.
- In each variation, choose whether to enable, disable, or inherit the calculator.
- Optionally override pricing settings for specific variations.
Enabling per-variation control
Parent product setup
- Edit a variable product.
- Go to the Measurement tab.
- Select a calculator type and configure settings as you would for a simple product.
- These settings become the defaults that variations inherit.
Variation settings
- Go to the Variations tab.
- Expand a variation.
- Find the Calculator dropdown at the bottom of the variation panel.
| Option | Behaviour |
|---|---|
| Inherit | Uses the parent product's calculator settings |
| Enabled | Calculator is active for this variation (with optional overrides) |
| Disabled | No calculator. This variation uses standard fixed pricing |
Common setup patterns
Pattern 1: Custom size + standard sizes
| Variation | Calculator | Notes |
|---|---|---|
| Custom Size | Inherit (enabled) | Customer enters measurements |
| 4ft × 8ft Sheet | Disabled | Fixed price, no calculator |
| 2ft × 4ft Sheet | Disabled | Fixed price, no calculator |
| Variation | Calculator | Override |
|---|---|---|
| Oak | Inherit | Price: $8.50/sq ft |
| Pine | Inherit | Price: $5.00/sq ft |
| Maple | Inherit | Price: $7.25/sq ft |
| Variation | Calculator | Notes |
|---|---|---|
| Small (under 10 sq ft) | Enabled | Min price: $50 |
| Large (10+ sq ft) | Enabled | Overage: 10% |
| Sample | Disabled | Fixed $5.00 |
Overriding pricing settings
When a variation's calculator is set to Enabled or Inherit, you can optionally check Override Pricing to customise:
| Setting | Description |
|---|---|
| Pricing Unit | Different unit than the parent (e.g., metres instead of feet) |
| Pricing Label | Custom label for this variation |
| Minimum Price | Variation-specific minimum order value |
| Overage % | Variation-specific waste buffer |
Frontend behaviour
Variation selection
When a customer selects a variation:
- If the variation has the calculator enabled (or inherits an enabled parent), the calculator fields appear.
- If the variation has the calculator disabled, the calculator hides and standard WooCommerce pricing is shown.
- The transition is seamless with a smooth show/hide animation.
Price display
- For calculator-enabled variations: the per-unit price label is shown (e.g., "$4.50 / sq ft").
- For disabled variations: the standard WooCommerce variation price is shown.
Resetting variation
When the customer resets the variation selection (clicks "Clear"), the calculator resets to the parent product's default settings.
Cart and checkout
- Each cart line item stores the variation ID alongside the measurement data.
- Variation-specific pricing (unit, minimum, overage) is used for cart calculations.
- The cart displays measurement details for calculator-enabled variations and standard details for disabled variations.
Pricing tables with variations
Pricing tables defined on the parent product apply to all variations that inherit or enable the calculator. Each variation uses the same tiered pricing rules but applies its own variation price as the base.
Tip: If you need completely different pricing tiers per variation, consider creating separate simple products instead of variations.
Best practices
- Use "Inherit" as the default. Only set "Enabled" or "Disabled" when a variation needs different behaviour.
- Use pricing overrides sparingly. If every variation has different settings, separate products may be simpler.
- Test each variation. Select each one on the frontend to verify the calculator shows/hides correctly.
- Set the parent product price. Even with variations, the parent product should have a base price set for display purposes.
- Consider customer experience. If most variations use the calculator, put the fixed-price ones last.
Troubleshooting
Calculator not showing for a variation
- Check the variation's Calculator setting is "Inherit" or "Enabled".
- Verify the parent product has a calculator type selected.
- Make sure the variation is published (not a draft).
- Check for JavaScript errors in the browser console.
Wrong price for a variation
- Check if Override Pricing is enabled for that variation.
- Verify the variation's regular price is set correctly.
- If using pricing tables, remember the parent's pricing rules apply.
Calculator persists after switching to a disabled variation
- Clear your browser cache.
- Check that the variation's calculator setting is explicitly "Disabled" (not "Inherit" with an enabled parent).