templates/front/catalog/product/view/reference-line.html.twig line 11

Open in your IDE?
  1. <div class="reference">
  2. {% set country = customerMgr.getCustomerCountry() %}
  3. <div class="reference-ctn">
  4. {% if product.picture %}
  5. <div class="img">
  6. <a href="{{ asset(product.picture.webPath) | imagine_filter('product_zoom') }}" data-caption="{{ product.name|escape('html_attr') }}" data-fancybox="references"><img src="{{ asset(product.picture.webPath) | imagine_filter('product_small') }}" alt="{{ product.name|e('html_attr') }}"></a>
  7. </div>
  8. {% endif %}
  9. {% include 'front/catalog/product/view/soleil.html.twig' %}
  10. <div class="stock-ctn">
  11. {% include 'front/catalog/product/view/stock.html.twig' %}
  12. {% if product.isAvailableForCountry(country) %}
  13. {% if product.id in discounts|keys %}
  14. {% set productsDiscounts = attribute(discounts, product.id) %}
  15. {% for discount in productsDiscounts %}
  16. {% include 'front/catalog/product/view/discount.html.twig' with {discount:discount} %}
  17. {% endfor %}
  18. {% endif %}
  19. {% endif %}
  20. </div>
  21. <div class="name-ctn">
  22. {% if product.parent %}
  23. <div class="name">{{ product.name|slice(product.parent.name|length+2, product.name|length) }}</div>
  24. {% else %}
  25. <div class="name"></div>
  26. {% endif %}
  27. {% if product.isAvailableForCountry(country) %}
  28. {% if product.getPrice(false, priceGroup) %}
  29. {% if customerMgr.canSeePrices() and not product.isStopped() %}
  30. {% include 'front/catalog/product/view/price-grid.html.twig' with {priceGrid:attribute(priceGrids,product.id)} %}
  31. {% endif %}
  32. {% set currentQty = cartMgr.qtyInCart(product) %}
  33. <div class="bt-cart {{ currentQty > 0 ? 'in-cart' : ''}}">
  34. {% if customerMgr.canSeePrices() and product.isAvailable() %}
  35. {% include 'front/cart/bt.html.twig' with {product:product} %}
  36. <div class="qty">
  37. <a class="down">-</a>
  38. <input type="text" value="{{ currentQty }}" name="qty[{{ product.id }}]" class="qty-value" data-id="{{ product.id }}">
  39. <a class="up">+</a>
  40. </div>
  41. {% endif %}
  42. </div>
  43. {% elseif customerMgr.isExpert() %}
  44. <p>{% trans %}Produit non disponible pour les Experts{% endtrans %}</p>
  45. {% endif %}
  46. {% endif %}
  47. </div>
  48. </div>
  49. {% if customerMgr.canSeePrices() and (product.ecotax > 0) %}
  50. <div class="eco-tax">{% trans %}Eco-participation{% endtrans %} : {{ product.ecotax|price }}</div>
  51. {% endif %}
  52. {% if customerMgr.canSeePrices() and not product.isStopped() and not product.isAvailable() %}
  53. <div class="stock-alert" style="height:30px; line-height:15px;">
  54. <a data-product="{{ product.id }}" data-customer="{{ customer.id }}" data-language="{{ app.request.getLocale() }}" class="bt-stock-alert">{% trans %}Prévenez-moi par email dès que l'article est en stock.{% endtrans %}</a><br>
  55. </div>
  56. {% endif %}
  57. </div>