Quantity Price
(BU) Quantity Price displays the current quantity-priced unit amount, selected-quantity subtotal, savings amount, or savings percentage. It supports volume and graduated pricing, simple products, selected variations, role eligibility, and mixed-product quantity groups. Optionally synchronize another product-price element in the same product wrapper.
On this page
Quick Setup
- Open Bricks > BricksUltimate > MISC, enable Quantity Pricing, and save.
- Create and publish an active rule under WooCommerce > Quantity Pricing, or save a product/variation override. Check product targets, roles, sale eligibility, dates, and coupon policy.
- Reload the Bricks editor. In the Quantity Pricing category, find (BU) Quantity Price, (BU) Quantity Pricing Table, and (BU) Quantity Pricing Progress.
- Place Quantity Price near the matching Add to Cart form. Leave Product / variation ID empty in a single-product template.
- Use Cart + product quantity input, select Unit price, and configure the original price, savings, badge, and optional subtotal.
- Customize its appearance under Content. All element-specific styling groups are there, not in a separate Appearance group.
- Optionally enable synchronization using the instructions below. Save and test the storefront, then compare the actual cart.
Product and Quantity Connections
| Control | Use |
|---|---|
| Product / variation ID | Leave empty for the current product/query-loop item. Accepts a fixed or dynamic ID. A variable parent follows the variation selected in its matching WooCommerce form. |
| Quantity source | Cart + product quantity input previews a purchase, combining eligible cart units with the input. Cart quantity only uses units already in the cart. Use cart-only mode in cart/checkout layouts. |
| Custom quantity selector | Optional CSS selector for the purchase input. Available in input mode. Use a unique selector when multiple forms are present; otherwise automatic product/form scoping is used. |
Selected quantity is not qualifying quantity. Selected quantity is the input amount, or this product's quantity already in the cart. Qualifying quantity can include other products assigned to the same winning mixed-product rule. The displayed subtotal covers the selected product units, not the full group or cart.
An element without a matching purchase input may preview the default purchase quantity. Do not use input mode for an informational cart-only display. Changing a display's quantity source does not add or remove products.
Price Display Controls
| Control | Behavior |
|---|---|
| Main value | Unit price, Selected-quantity subtotal, Savings amount, or Savings percentage. The percentage describes the effective reduction from the product base, not necessarily the last graduated band's percentage. |
| Show original price | Shows the pre-quantity-discount product base when a reduction exists. Applies to unit/subtotal modes; subtotal mode uses the corresponding original selected subtotal. |
| Show savings | Displays the savings message when a discount is active. |
| Show subtotal | Adds an estimated selected-product subtotal. Suppressed when the main value already is the subtotal. |
| Show selected quantity | Displays the configurable quantity message. |
| Show discount badge | Shows the configured badge only when a discount is active. |
| Show pricing note | Shows the product-price scope note and any calculation note supplied by the quote. |
| Hide when no eligible rule | Hides the frontend element if no rule applies. Otherwise unit mode can show the normal product price; an unselected variable product shows its variation message. |
| Hide before a discount unlocks | Hides the frontend element until the calculated price has a reduction, even if an eligible rule exists. |
| Announce price changes | Adds a polite live announcement to the main value for assistive technology. |
| Savings amount basis | Per item or Selected quantity. Controls savings-amount mode and the savings message amount. |
Labels, Messages, and Tokens
Set an optional Heading and Main value label. Use Main value prefix for text before the number and Main value suffix for unit-price text such as each. The suffix is available in unit mode. Empty optional labels remove that text.
| Field | Purpose |
|---|---|
| Subtotal label | Labels the supplementary amount; for example, Estimated subtotal. |
| Savings message | Supports {amount}, {percent}, and {quantity}. Amount follows Savings amount basis. |
| Quantity message | Supports {quantity} for the selected product units and {qualifying} for the qualifying product/rule-group count. |
| Discount badge | Short badge text, such as Quantity discount. |
| Pricing note | Clarify exclusions. Default: Product price only. Add-ons, shipping and checkout adjustments are separate. |
| Choose variation message | Prompts a customer to select an option before a variation price can be calculated. |
| Unavailable price message | Shown when a valid price is unavailable for the selection. |
| Refresh error message / Retry button label | Feedback for a failed local refresh. Retry recalculates available local data; it does not fetch a new pricing profile. |
Save {amount} ({percent})
{quantity} selected; {qualifying} units qualify
Tokens belong to the fields listed above, not every text control. Keep the scope note visible when a subtotal could otherwise be mistaken for the final checkout amount.
Synchronize an Existing Product Price
Synchronization is optional and display-only. It lets an existing product-price element show the quantity-priced unit amount, regardless of Quantity Price's Main value mode. It does not globally replace every price on the site.
- Keep the matching product form, Quantity Price, and target price in one enclosing product wrapper.
- Enable Synchronize another price.
- Set Target price selector. The default
.brxe-product-pricetargets Bricks Product Price. For greater precision, assign a class such asmy-live-priceto the intended price and enter.my-live-price. - Optionally set Product wrapper selector, such as
.my-product. It must be an enclosing wrapper containing this pricing element and its matching form. Without it, the nearest product/loop scope is used. - Choose whether Sync original strikethrough should include the original price when discounted.
- Test quantity changes, variation changes/reset, multiple product cards, and popup open/close. Only the matching product's target should change.
The original target markup is restored when synchronization is cleared, a variation resets, or the instance is removed, provided a different integration has not since replaced that content. Avoid multiple pricing widgets or scripts competing for the same target.
Layout and Style Controls
All Quantity Price controls, including styles, are under Content. Normal Bricks root styling remains available. The Table and Progress elements retain their own existing control organization.
- Presentation: Stacked, Inline, or Price and savings split.
- Original price position: before or after the current value.
- Alignment: start, center, or end.
- Badge position: beside, above, or below the price.
- Section gap, Price gap, Details gap: control spacing without empty spacer elements.
- Price wrapping: Wrap or No wrap. Prefer wrapping in narrow cards and mobile layouts.
- Content width: sets the outer element width using the available units.
Separate style groups cover Wrapper, Heading, Label, Current price, Original price, Prefix, Suffix, Currency symbol, Badge, Savings, Subtotal, Subtotal value, Quantity, Note, Response, and Retry button. Each provides typography, color, background, padding, margin, border, and shadow. Wrapper, Badge, and Retry button also have width controls. Original price includes a text-decoration option; Retry includes hover text, background, and border colors.
For a clean product header, use Inline presentation, a strong current price, quieter original price, a small contrasting badge, and a readable scope note. Check long translated labels and large currency amounts at mobile widths. Do not force hidden optional fields back into view with custom CSS.
Calculation Examples
| Example | Display |
|---|---|
| Volume: base 100; 5+ units at 20% off; select 5 | Unit 80; original 100; selected subtotal 400; savings 20 per item or 100 for the selection; 20% effective savings. |
| Graduated: first 2 units at 100; units 3 onward at 80; select 5 | Total 440; effective blended unit rate 88; savings 12 per item or 60 for the selection; 12% effective savings. It does not show 80 as the rate for every unit. |
| Mixed volume group: 3 other eligible units in cart; select 2 of this 100-base product; group reaches 5 at 20% off | Qualifying quantity 5; selected quantity 2; unit 80; selected subtotal 160. Other products' amounts are not included in that subtotal. |
Examples omit tax and other adjustments for clarity. Display amounts use WooCommerce's prepared customer pricing/tax context and currency formatting. Graduated unit rates are blended and can be rounded for display; do not reconstruct the final line total by multiplying a rounded visible unit rate.
Scope: This is the product component, not an add-on grand total or checkout total. Shipping, add-on charges, coupons, fees, and final checkout adjustments are separate. Use (BU)Price inside Mini Cart Contents for actual configured cart-line prices; do not replace those with this product-only estimate.
Client-Side Updates and WooCommerce Context
The server embeds customer-eligible rule profiles and display-price data. Quantity edits calculate locally in JavaScript using decimal-safe arithmetic, with the store's currency symbol, position, decimal precision, decimal separator, and thousands separator. There is no dedicated Quantity Pricing AJAX request for each quantity edit. Table, Progress, and the supported BU Product Addons preview use the same local pricing client.
Normal WooCommerce requests still handle real cart writes, checkout updates, and variation lookup where needed. Their cart fragments, checkout fragments, variation data, and Cart/Checkout Blocks Store API context supply updated profiles and cart quantities. Removing products, changing a mixed group, or applying/removing a pause-policy coupon can therefore update the display without a separate pricing request.
Cart prices are always validated server-side. A browser estimate does not bypass role restrictions, stock, required add-ons, or checkout validation. Newly inserted pricing widgets initialize automatically in AJAX layouts. Test third-party popup and cart integrations that may not publish normal WooCommerce updates.
Refresh the page after editing rule settings in another tab or changing the customer's pricing context outside the normal WooCommerce update flow. Exclude personalized pricing pages from shared full-page caching or vary them correctly by customer context. Never cache checkout/cart responses for all customers.
Placement and Builder Preview
- Single product: use current-product context and the matching purchase input.
- Variable product: keep the normal variation form in the same product scope. Selecting a variation updates its own price/rules; resetting shows the variation prompt.
- Product query loop: place the widget inside the intended product item. Keep each card's form and synchronization target scoped to that product.
- Quick View: place it in the product popup with its matching form. Test first AJAX insertion, variation selection, and repeated opening.
- Cart / mini-cart / checkout: use Cart quantity only and an explicit product/variation context when needed. Leave actual cart-line and total displays to WooCommerce.
The authorized Bricks editor uses a real eligible rule where possible. Without one, Quantity Price shows a read-only sample: original 100, current 80, quantity 5, subtotal 400, and 20% savings, formatted in the store currency. It does not create a rule or change the cart. Demo data never appears on the storefront and synchronization never modifies other prices in the editor.
Troubleshooting
| Symptom | Check |
|---|---|
| Element missing | Enable Quantity Pricing in MISC, save, and reload Bricks. Look in the Quantity Pricing category; no separate Woo Elements switch is required. |
| Normal price remains | Check the threshold, rule publication/active state, product or variation target, overrides, role, schedule, coupon policy, and sale-product eligibility. |
| Whole element disappears | Check Hide when no eligible rule and Hide before a discount unlocks. A variable product may still need a selection. |
| Other price does not synchronize | Enable synchronization, verify the target is price-only, and ensure the wrapper contains this widget and matching form. Cart totals and controls are deliberately protected. |
| Subtotal differs from cart total | This is selected product units only, without add-ons/shipping/final checkout adjustments. Group quantity can qualify a tier without all group amounts appearing in the subtotal. |
| Price seems stale or Retry appears | Check JavaScript errors, valid input quantity, matching variation data, and cached assets. Retry recalculates locally. Reload for a fresh server profile; there is no pricing endpoint/nonce to repair. |
| Builder differs from storefront | The builder may show demo data or use the editor's customer context. Test a real eligible shopper and product on the frontend. |
Launch Checklist
- Test below, at, and above each break, then reduce quantity.
- Test simple products and each applicable variation, including reset and opt-outs.
- Test eligible/ineligible roles, sale products, coupon policies, and mixed-group cart additions/removals.
- Compare unit/subtotal/savings modes with WooCommerce's final cart calculation.
- Check synchronized targets in multiple cards and popups; unrelated prices must remain unchanged.
- Check long currency values and translated labels on desktop and mobile.
- Verify normal cart/block updates work and demo data does not leak onto the storefront.