Remaining Product Stock
Zid provides merchants with the ability to display the remaining stock quantity for products, enhancing transparency and encouraging faster purchases. As a theme developer, integrating this feature ensures a smoother experience for both merchants and customers.
Activation Steps for Merchants
Merchants can manage the display of remaining stock directly from Order and Product Setting page.
When configured, the remaining stock quantity is reflected in the product data object under product.low_stock_quantity
. For further details, refer to the product schema.
Code Snippet Integration for Theme Partners
This code snippet checks the low_stock_quantity
value for a product and displays a visually distinct notification indicating the remaining quantity.
:::highlight yellow 💡
The snippet is designed to be visually noticeable by using a flag icon and distinctive styling to draw attention to the low stock status.
:::
{% if product.low_stock_quantity %}
<div class="low-quantity-section d-inline-block">
<span class="icon-flag_black" style="color: #EC5550; font-size: 16px"></span>
<span class="low-quantity">
{{ locals.product_cart_quantity_low_stock | format(product.low_stock_quantity) }}
</span>
</div>
{% endif %}