themes/BootstrapChildTheme/SyliusShopBundle/views/Product/Show/_inventory.html.twig line 1

Open in your IDE?
  1. {% if product.enabledVariants.empty() or (product.simple and product.enabledVariants.first.isTracked and not (1 <= (product.enabledVariants.first.onHand - product.enabledVariants.first.onHold))) %}
  2.     {#{% include '@SyliusShop/Product/Show/_outOfStock.html.twig' %}#}
  3.     <div class="alert alert-primary" id="sylius-product-out-of-stock" {{ sylius_test_html_attribute('product-out-of-stock') }}>
  4.         {{ 'sylius.ui.out_of_stock'|trans }}
  5.     </div>
  6. {% elseif product.simple and not product.enabledVariants.first.isTracked and 0 == product.enabledVariants.first.onHand %}
  7.     <div class="alert alert-primary" id="sylius-product-out-of-stock-long-term" {{ sylius_test_html_attribute('product-out-of-stock-long-term') }}>
  8.         {{ 'app.ui.out_of_stock_long_term'|trans }}
  9.     </div>
  10. {% else %}
  11.     {{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
  12. {% endif %}