Search code examples
javainventorybroadleaf-commerce

Show quantity-available on inventory in broadleaf framework 5.2.x


how to show quantity-available of product in broadleaf framework? example is this picture

Can you help me?


Solution

  • You would use the field org.broadleafcommerce.core.catalog.domain.SkuImpl#quantityAvailable. In a Thymeleaf template, assuming a Sku is on the model as 'sku', you could do something like <span th:text="${sku.quantityAvailable}"></span>.