Documentation menu

The storefront block

What the Omnibus price block shows on your product page, its five settings, and when it hides itself.

OmniBuzz adds one app block to your theme: Omnibus price. It works with themes that support app blocks on the product page, which includes Online Store 2.0 themes. It reads a metafield ($app:omnibus) that OmniBuzz writes for each variant, and it prints two things:

  • the label, for example “Lowest price in the last 30 days: €49.90”
  • an optional badge, for example “-20%”

Block settings

SettingOptionsDefault
ProductThe product to read. Leave it on the page’s product unless you place the block somewhere else.Current product
Show discount percentageOn or off.On
Text sizeSmall or medium.Small
Text colorAny color.#595959
AlignmentLeft, center or right.Left

The words of the label and the badge are not block settings. You change them on the Labels page in the app.

When the label shows

The block shows the label only when all of these are true for the selected variant in the buyer’s market:

  1. OmniBuzz has a result for this variant and market, and that result says to show a label.
  2. The stored currency equals the buyer’s cart currency.
  3. The variant is on sale right now: the compare-at price is above the price.
  4. The stored price matches the live price. If you changed the price after the last nightly check, the label hides until the next one.
  5. The prior price is above zero.

If any condition fails, nothing is visible. If no variant of the product has a result for the market, the block prints nothing at all.

Converted markets follow a slightly different price check. Shopify converts prices with a daily exchange rate, so the block accepts a small drift. See Labels and markets.

The badge

The percentage is calculated from the prior price and rounded down. It appears only when it is above zero. When the sale price is not below the prior price, or the reduction is under 1%, the block shows the label alone.

Variant changes

When a shopper switches variant, the block re-checks the same rules in the browser and updates the label and badge without a page reload. A variant without a result hides the label. If the data in the page cannot be read, the label is hidden as well.

Themes that change the selected variant in script without firing a change event, or that only update the URL with history.replaceState, may not trigger the update. Test your theme in the editor preview.

The crossed-out price is yours

The crossed-out price on the page is your theme’s compare-at price. OmniBuzz cannot remove or replace it. Set the compare-at price to the prior price shown by the app. The Home page warns about variants whose sale price is not below the prior price and about variants priced above it. It does not check the compare-at price itself, so compare it with the prior price shown by the app.

More than one block. You can place the block in several sections of the same product page. The script loads once and every block updates.