thegeneralyst/AnopaDocs
PDP

Stock Count

Companion to AP_StockRemaining in Slots mode. Drop inside a slot design to display the live quantityAvailable value from the selected variant. Shows 24 on canvas as a preview.

What it does

Stock Count is a companion component to AP_StockRemaining in Slots mode. Drop it inside one of your slot designs (for example, a Low Stock component) to display the live quantityAvailable number from the selected variant. On the canvas it shows a preview value of 24 so you can design around a realistic number.

The component renders as an inline <span>, so it fits naturally inside any text context, such as "Only 3 left" or "5 in stock".

How to set it up

  1. Open your Low Stock or Available slot design.
  2. Add AP_StockCount where you want the inventory number to appear.
  3. Optionally configure the Prefix and Suffix properties to wrap the number with text (for example, Only before and left after).
  4. Adjust Color and Font to match your design system.

When a variant is selected and inventory is tracked, AP_StockCount will display that variant’s quantityAvailable. When no variant is selected or inventory isn’t tracked, it shows the Fallback text instead.

Key behaviours

  • Reads the live quantityAvailable from the currently selected variant.
  • Renders as an inline <span> so it can be embedded inside sentences.
  • Shows 24 as a design-time preview value on the canvas.
  • Uses Fallback text when there is no valid quantity to show (for example, no variant selected or inventory tracking disabled).
  • Fully styleable via Color and **Font` properties.

Property Controls

ControlTypeDefaultDescription
PrefixStringOptional text shown immediately before the quantity (for example, "Only ").
Optional text shown immediately after the quantity (for example, " left").
Text to display when no variant is selected or inventory is not being tracked.