-
Online Sale Price
Paige Boucle Upholstered Mid Back Rocking Chair Beige
Vendor:CoasterRegular price $278.00Regular priceUnit price per$308.00Sale price $278.00Online Sale Price -
Online Sale Price
Paige Boucle Upholstered Mid Back Rocking Chair Taupe
Vendor:CoasterRegular price $278.00Regular priceUnit price per$308.00Sale price $278.00Online Sale Price
How to use Inventory Status Pills
This block creates inventory status badges that can be added to product cards. To implement:
- Add this block to your product card templates or collection page sections
- The pills will automatically detect product inventory levels
- Customize the appearance, position, and thresholds using the settings below
- Pills work with both grid and list layouts
Note: The examples below show how the pills will appear on actual product cards.
Product Image
In Stock
Sample Product (In Stock)
$29.99
Product Image
Low Stock
Sample Product (Low Stock)
$39.99
Product Image
Out of Stock
Sample Product (Out of Stock)
$49.99
Implementation Code:
Add this Liquid code to your product card templates:
{% liquid assign total_inventory = 0 for variant in product.variants if variant.inventory_management == 'shopify' and variant.inventory_policy == 'deny' assign total_inventory = total_inventory | plus: variant.inventory_quantity endif endfor assign status = 'in-stock' if total_inventory <= 0 assign status = 'out-of-stock' elsif total_inventory <= LOW_STOCK_THRESHOLD assign status = 'low-stock' endif %} {% if status == 'in-stock' and SHOW_IN_STOCK %} In Stock {% elsif status == 'low-stock' and SHOW_LOW_STOCK %} Low Stock {% elsif status == 'out-of-stock' and SHOW_OUT_OF_STOCK %} Out of Stock {% endif %}
Replace the uppercase variables with your block settings values.