Start Trial
Home / Documentation / Complete Feature Reference

Complete Feature Reference

One page that documents everything Discount Rules Box can do — every setting, every pricing model, every shortcode and every developer hook.

📦 What you get: quantity breaks and volume discounts shown in a 2–3 pack buy box, applied automatically in the cart, tracked in analytics, translated in 13 languages — all configured from a single dashboard with a real-time live preview.

Table of Contents

  1. Installation & Requirements
  2. Dashboard Overview
  3. Pricing & Tiers
  4. Appearance & Customization
  5. Display Elements
  6. Texts, Badges & Translation
  7. Placement & Shortcodes
  8. Cart, Checkout & Order Meta
  9. Analytics & Reporting
  10. Free vs Pro
  11. Compatibility & Technical Notes
  12. Developer Hooks
  13. Related Docs

1. Installation & Requirements

The plugin runs on top of WooCommerce. If WooCommerce is not active, the plugin refuses to activate and shows a clear message.

RequirementMinimum
WordPress6.4 or later (Requires at least)
PHP8.0 or later
WooCommerce7.0 or later (WC requires at least)
Tested up toWooCommerce 9.5
  • WooCommerce dependency: the plugin declares Requires Plugins: woocommerce. During activation, drbu_activate() checks for an active WooCommerce (including network-activated on multisite) and deactivates the plugin with a notice if it is missing.
  • HPOS ready: on before_woocommerce_init the plugin declares compatibility with WooCommerce Custom Order Tables via FeaturesUtil::declare_compatibility( 'custom_order_tables', … ), so it is safe to enable HPOS.
  • Activation: upload the ZIP under Plugins → Add New → Upload Plugin, or copy the folder to /wp-content/plugins/ and activate. See the Quick Start Guide.
  • Text domain: discount-rules-box-upsell — the plugin is fully translatable through standard WordPress language packs.
⚠️ Getting a “upload_max_filesize” error? The plugin ZIP is only ~100 KB, so the error comes from the server — see the FAQ for php.ini, .htaccess, wp-config.php, multisite and FTP fixes.

2. Dashboard Overview

After activation, all settings live under WooCommerce → Discount Rules Box. There is also a dedicated reporting page under WooCommerce → DRBU Analytics. Both require the manage_woocommerce capability.

Five tabs, one form

#TabWhat it controls
1Tiers & PricingNumber of tiers, the 4 pricing models, discount unit, per-tier quantities, labels, notes and amounts.
2Appearance & Styles7 style presets, brand colors, button/card corner radiuses.
3Display OptionsWhich buy box elements are visible: free shipping, footer badges, savings, best value, per-unit and strikeout price.
4Texts & Badges1-click language presets (13 languages) and every editable string, package title and note.
5IntegrationProduct page display, replace Add to Cart, category popup, hide default price, product & category restrictions.

Built-in tools

  • Live Preview: a sticky right-hand panel renders the exact frontend buy box in real time as you change any setting. Toggle between desktop and mobile views. You can enter a demo product base price (default $18.00) to preview realistic math.
  • Reset to Defaults: one click restores every parameter and style to factory defaults.
  • AJAX product search: in the Integration tab, search products by name or ID while typing (protected by a WordPress nonce) to build restriction lists.
  • Settings shortcut: a “Settings” link is added to the plugin row on the Plugins page.
💡 Every change is saved with one Save Settings button and applies immediately to the frontend and the [tiered_buy_box] shortcode.

3. Pricing & Tiers

The core feature: the buy box offers 2 or 3 packaging tiers (e.g. 1, 2 and 3 pieces). Each tier has its own quantity, title, note and discount value. All math runs centrally in DRBU_Pricing_Engine, so the displayed price always matches the cart price.

Number of packaging tiers

  • 2 Tiers — packs of 1 and 2 pieces (maximum in the Free version).
  • 3 Tiers — packs of 1, 2 and 3 pieces (Pro feature).

The 4 pricing models

Examples below use a base price of $18.00 per piece, tier 2 discount 40% and tier 3 discount 25% (percentage unit).

🎯 Model A — Discount on Additional Items

The discount applies only to the 2nd and 3rd piece; the 1st piece always costs the full price. 2 pieces: $18 + $10.80 = $28.80 total ($14.40/unit). 3 pieces: $18 + $10.80 + $13.50 = $42.30 total ($14.10/unit). The recommended model for driving buyers to 2+ pieces.

🏷️ Model B — Discount on Entire Quantity

The discount applies to every item in the pack. 2 pieces at 40% off: $36 × 0.60 = $21.60 total ($10.80/unit). 3 pieces at 25% off: $54 × 0.75 = $40.50 total ($13.50/unit).

💵 Model C — Fixed Total Bundle Price

You set an exact fixed total for each pack. E.g. Tier 1 = $18.00, Tier 2 = $28.80 total, Tier 3 = $39.99 total. Perfect for psychological pricing like $39.99.

🏷️ Model D — Fixed Price Per Unit

You set an exact price per single item per tier. E.g. Tier 2 = $14.40/unit → $28.80 total, Tier 3 = $13.50/unit → $40.50 total. The pack total is simply unit price × quantity.

Discount unit

  • Percentage (%) — the tier value is a percent off the base price.
  • Fixed amount ($) — the tier value is subtracted from the base price per discounted item.

Per-tier configuration

Each tier row stores:

FieldMeaningDefault
Quantity (pcs)Pieces in the pack1 / 2 / 3
Package titleShown on the pack card, supports {qty}“1 piece”, “2 pieces”, “3 pieces”
Note / descriptionSubtitle on the pack card, supports {d2}, {d3}, {save}, {qty}, {price}“Second item − {d2} · {save}”
Discount / fixed pricePercent or amount (Model A/B), fixed pack total (Model C) or fixed unit price (Model D)0 / 40 / 25

Best value badge

Choose which tier carries the “Best Value” badge and is pre-selected in the buy box (drbu_best_value_index, default = tier 2). The badge color is configurable.

Currency display

  • Default — standard WooCommerce formatting (uses the store currency symbol and position automatically).
  • Hide zeros — whole amounts display without decimals (e.g. $18 instead of $18.00).
ℹ️ Quantities above 3 pieces follow the 3rd tier structure: in Model A each additional piece beyond 3 receives the tier 3 discount, in the other models the pack price is extrapolated from the highest active tier.

4. Appearance & Customization

7 style presets (one-click themes)

PresetPrimaryButton radiusCard radius
Warm Rose Gold (Default)#c49186100px (Pill)16px
Amazon Orange#ff9900100px16px
Sunny Yellow#ffd814100px16px
Ocean Royal Blue#0070ba100px16px
Modern Blue#2563eb14px (Rounded)12px
Emerald Fresh#10b981100px16px
Energy Red (Sharp)#dc26260px (Sharp)0px

Custom colors

  • Primary color — buttons, radio selection and accents (drbu_primary_color).
  • Button text color — CTA text (drbu_cta_text_color).
  • “Best Value” badge color (drbu_best_value_color).
  • Card background — the tier card fill (drbu_card_bg_color).

Corner radiuses

  • Button: Pill 100px · Rounded 14px · Soft 8px · Sharp 0px.
  • Card: 16px · 12px · 6px · 0px.

How styling is applied

The plugin injects a small inline CSS block (dynamic_css()) that sets CSS variables on :root: --drbu-primary, --drbu-primary-hover, --drbu-primary-soft, --drbu-primary-rgb, --drbu-cta-text, --drbu-best-value, --drbu-card-bg, --drbu-btn-radius, --drbu-card-radius. The static stylesheet reads them, with safe fallbacks, so the buy box works even without the inline style. Hover and soft shades are derived automatically from the primary color.

💡 For per-page tweaks, override the same CSS variables in your theme — see Developer Docs.

5. Display Elements

Toggle every element of the buy box from the Display Options tab. Disabled elements are hidden together with their related settings.

OptionDefaultWhat it does
Show free shippingPro: on / Free: offShows a shipping status line per pack and a ✓ free-shipping badge on qualifying packs, based on the free shipping threshold.
Free shipping threshold$50A pack is marked “Free shipping” when its total reaches this amount.
Show footer badgesOnRenders trust badges (one per line, with a checkmark icon) below the CTA button.
Show savingsOnDisplays the saved amount on each pack and on the cart line item.
Show best value badgeOnHighlights the recommended tier with the “Best Value” badge.
Show per-unit priceOnShows the price per piece (e.g. $14.40 per unit) next to the headline price and on each pack.
Show strikeout priceOnStrikes the original price next to the discounted pack price (was price).
⚠️ The free shipping display defaults to off in the Free version and on in Pro — see Free vs Pro.

6. Texts, Badges & Translation

1-click language presets

The Texts & Badges tab can fill every label automatically with high-converting translations:

  • 🇬🇧 English (Global) · 🇪🇸 Español · 🇩🇪 Deutsch · 🇫🇷 Français · 🇮🇹 Italiano
  • 🇧🇷 Português (Brazil) · 🇷🇺 Русский · 🇮🇳 हिन्दी · 🇳🇱 Nederlands
  • 🇵🇱 Polski · 🇷🇴 Română · 🇭🇺 Magyar · 🇷🇸 Srpski / Hrvatski / Bosanski

Every field remains 100% customizable after applying a preset.

All editable strings

SettingDefault (English)
best_labelMost Popular
in_stock_labelIn stock
per_unit_labelper unit
total_labeltotal
pack_total_labelfor {qty} pieces · total
savings_labelsavings
ship_free_textFree shipping included in this pack
ship_paid_prefixFree shipping for orders over
free_ship_flagFree shipping
cta1Order 1 piece — {price}
cta2Order 2 pieces — {price}
cta3Order 3 pieces — {price}
cart_pack_labelPack of {qty} pieces
footer_badgesShipping 1–3 days / Cash on delivery / Money-back guarantee (one per line)

Package titles & notes

Each tier has its own title and note. Tier notes render the discount and savings automatically.

Placeholders

Placeholders are replaced with real values at render time:

{price}      → discounted pack total (e.g. $28.80)
{save}      → savings label + saved amount (e.g. savings $7.20)
{qty}       → pieces in the pack (e.g. 2)
{unit_price}→ price per piece (e.g. $14.40)
{d2}        → tier 2 discount (e.g. 40% or $7.20)
{d3}        → tier 3 discount (e.g. 25% or $4.50)

Trust badges

The “badges below the button” textarea renders one badge per line with a ✓ icon — e.g. “Shipping 1–3 days”, “Cash on delivery”, “Money-back guarantee”.

7. Placement & Shortcodes

Where the buy box appears

  • Automatic display — inserted on every simple, purchasable product page (hook woocommerce_single_product_summary, priority 35) when automatic display is on.
  • Replace default “Add to cart” — removes the standard WooCommerce add-to-cart form so only the buy box is shown.
  • Hide default product price — hides the standard price header (with a body class drbu-hide-default-price for block themes).
  • Category & Shop popup — on shop, category and archive grids, clicking “Add to cart” opens the buy box in an interactive modal loaded via AJAX.

Product & category restrictions

  • Product restriction: comma-separated product IDs, built with the built-in AJAX search (tag pills UI).
  • Category restriction: checkbox list of all product categories.
  • Storewide vs Target mode: with no restrictions the box appears on all simple products (Storewide); with any restriction it appears only on the selected products/categories (Target).

Shortcodes

ShortcodeDescription
[tiered_buy_box]Renders the buy box for the current product (single product page).
[tiered_buy_box id="123"]Renders the buy box for a specific product anywhere — pages, posts, landing pages.
[order_now_5]Legacy shortcode (backward compatible) with old attributes.
[poruci_odmah_5] / [poruci_odmah_4]Legacy Serbian shortcodes, same behavior.

Legacy shortcode attributes

[order_now_5 id="123" discount2="40" discount3="25"
  free_ship_threshold="50" best_label="Best value"
  note1="Basic" note2="Popular" note3="Best deal" auto_discount="yes"]
  • discount2, discount3 — override the 2nd/3rd tier discount.
  • free_ship_threshold — override the free shipping threshold.
  • best_label — override the best-value badge text.
  • note1, note2, note3 — override each tier note.
  • auto_discount — enable/disable automatic discount calculation.

Frontend behavior

  • The box renders only for simple, purchasable products with a price.
  • Each product renders once per page — if the shortcode and auto-insert are both active, duplicates are prevented.
  • The template file is templates/tiered-buy-box.php and can be overridden from the theme (see Developer Hooks).

8. Cart, Checkout & Order Meta

Buy box CTAs add the product to the cart with a pack parameter (?drbu_pack=N) and the pricing model (drbu_pm). DRBU_Cart_Handler then takes over.

Cart lifecycle

  1. Add to cart: pack data is attached to the cart item (drbu_tier_index, discount type, pricing model, original price, drbu_d2, drbu_d3) and restored from the session on every request.
  2. Price recalculation: before cart totals are calculated (woocommerce_before_calculate_totals) the per-unit price is recomputed with DRBU_Pricing_Engine and line totals are set explicitly, so no theme or plugin can revert the regular price.
  3. Cart display: under the product name the plugin shows the pack label (e.g. “Pack of 2 pieces”) and the savings amount (e.g. “savings $7.20”).
  4. Checkout & order: pack details are stored as order item meta for reporting and support.

Order meta written per item / order

Meta keyContent
_drbu_tier_indexPack index chosen (1, 2 or 3)
_drbu_tier_qtyPieces in the pack
_drbu_original_priceBase per-unit price before discount
_drbu_pack_labelRendered pack label (e.g. “Pack of 2 pieces”)
_drbu_order_upsellyes — flags the whole order as a DRBU upsell
_drbu_max_tier_qtyLargest pack quantity in the order
💡 Legacy orders created by older plugin versions are still recognized by analytics through the item meta (_drbu_tier_qty, drbu_tier_qty, _drbu_pack_label).

9. Analytics & Reporting

WooCommerce → DRBU Analytics measures exactly how much incremental revenue the buy box generates. Only orders in completed, processing or on-hold status that contain DRBU packs are included. Periods: 7 days, 30 days, this month, all time (default 30 days).

Core metrics

MetricWhat it measures
Total Upsell RevenueAll revenue from DRBU orders in the period.
Total Orders CountNumber of DRBU orders in tracked statuses.
Average Order Value (AOV)Total revenue ÷ total orders.
Total Customer SavingsOriginal total − paid total across all DRBU items.
Added Upsell RevenueIncremental revenue vs. a single-item baseline for packs of 2+ pieces.
Upsell Conversion RateShare of DRBU orders that bought 2+ pieces.
Upsell Revenue Boost %Added upsell revenue ÷ baseline single-item revenue.

Breakdowns

  • Sales by Pack Tiers — orders and revenue split into Pack 1, Pack 2, Pack 3 and Pack 3+ (any order over 3 pieces), with percentages and the most popular tier highlighted.
  • Top Upsell Products — the 5 best performers, sorted by pack 2/3+ sales, with thumbnails, SKU, units, revenue and upsell revenue.
  • Recent Upsell Orders — latest orders with number, date, customer, pack badge, status, origin (Checkout / Admin / DRBU Upsell / Web) and total, each linked to the order editor.
ℹ️ Free users see a Pro trial banner inside the dashboard encouraging the 30-day trial — see Free vs Pro.

10. Free vs Pro

Licensing runs through Freemius (SDK initialized by drbu_fs()). The Free version is fully functional; the Pro version adds two features. drbu_is_pro_active() returns true when a Pro license is active or during the 30-day free trial (no payment details required).

FeatureFreePro
Packaging tiersMaximum 2 tiers (1 & 2 pieces)Up to 3 tiers (1, 2 & 3 pieces)
Free shipping displayOff by defaultOn by default
Everything elseIdentical: 4 pricing models, all styles, all texts, shortcodes, cart, analytics
💡 Start the 30-day Pro trial from the pricing section of the landing page — you get access to the 3rd tier immediately.

11. Compatibility & Technical Notes

  • WooCommerce HPOS: full compatibility declared for Custom Order Tables.
  • Tested up to WooCommerce 9.5; requires PHP 8.0 and WordPress 6.4+.
  • Architecture: clean object-oriented code — every module is a singleton (DRBU_Core, DRBU_Settings, DRBU_Pricing_Engine, DRBU_Cart_Handler, DRBU_Shortcode, DRBU_Product_Display, DRBU_Analytics, DRBU_License).
  • Security: AJAX endpoints check a nonce (drbu_admin_nonce) and the manage_woocommerce capability; all output is escaped/sanitized.
  • Assets: minified in production, unminified when SCRIPT_DEBUG is on; frontend assets load only when needed (product, shop, category, archive, shortcode or category popup).
  • Multisite: WooCommerce detection includes network-activated plugins.
  • Backward compatibility: legacy functions drbu_calculate_unit_price() and drbu_tier_total() still work, plus the legacy order_now_5 / poruci_odmah_5 / poruci_odmah_4 shortcodes.

12. Developer Hooks

For developers, see the full guide in Developer Docs. Summary of the extension points:

Filters

FilterPurpose
drbu_is_pro_activeOverride Pro detection (returns bool).
drbu_enqueue_frontend_assetsConditionally load or defer frontend assets.
drbu_pack_discounts_enabledGlobally disable cart price recalculation.
drbu_tier_totalCustomize the final pack total after the pricing engine runs.
drbu_license_is_valid / drbu_license_statusIntegrate an external licensing add-on.

Actions

ActionPurpose
drbu_license_initFires on init (priority 99) for licensing add-ons to hook into.

Template override

templates/tiered-buy-box.php  →  your-theme/woocommerce/tiered-buy-box.php

Copy the template into the theme’s woocommerce/ folder to fully customize the markup. Theme overrides survive plugin updates.

Custom CSS

:root {
  --drbu-primary: #2563eb;      /* buttons & accents */
  --drbu-cta-text: #ffffff;     /* button text */
  --drbu-best-value: #1d4ed8;   /* best value badge */
  --drbu-card-bg: #f8fafc;      /* tier card background */
  --drbu-btn-radius: 100px;     /* button corner radius */
  --drbu-card-radius: 16px;     /* card corner radius */
}

🚀 Quick Start Guide

Install and configure the plugin in 4 steps.

🧮 Pricing Models

Deep dive into the 4 calculation models and margin strategy.

🎨 Appearance & Styles

Presets, colors and corner radiuses.

👁️ Display Options

Every buy box element, toggled.

🌐 Texts & Badges Translation

Language presets and all editable strings.

📄 Product Page Display & Integration

Automatic display, popups and restrictions.

🔗 Shortcodes

All shortcodes, attributes and placeholders.

📊 Analytics Dashboard

Metrics, revenue math and tier breakdowns.

🧩 Compatibility

HPOS and WooCommerce version support.

👨‍💻 Developer Docs

Filters, hooks, templates and CSS variables.

FAQ

Common issues and troubleshooting.

📜 Changelog

Version history.