app/Plugin/RelatedProduct42/Resource/template/front/related_product.twig line 1

Open in your IDE?
  1. <script>
  2.     $(function () {
  3.         $('#RelatedProduct-product_area').appendTo($('.ec-layoutRole__main, .ec-layoutRole__mainWithColumn, .ec-layoutRole__mainBetweenColumn'));
  4.     });
  5. </script>
  6. <div id="RelatedProduct-product_area" class="ec-shelfRole">
  7.     <ul class="ec-shelfGrid">
  8.         {% for RelatedProduct in Product.RelatedProducts %}
  9.             {% set ChildProduct = RelatedProduct.ChildProduct %}
  10.             {% if ChildProduct.Status.id == constant("Eccube\\Entity\\Master\\ProductStatus::DISPLAY_SHOW") %}
  11.                 <li class="ec-shelfGrid__item">
  12.                     <a href="{{ url('product_detail', {id : ChildProduct.id}) }}">
  13.                         <p class="ec-shelfGrid__item-image">
  14.                             <img src="{{ asset(RelatedProduct.ChildProduct.main_list_image|no_image_product, 'save_image') }}">
  15.                         </p>
  16.                         <p>{{ RelatedProduct.ChildProduct.name }}</p>
  17.                         <p>
  18.                             {% if RelatedProduct.ChildProduct.hasProductClass %}
  19.                                 {% if RelatedProduct.ChildProduct.getPrice02Min == RelatedProduct.ChildProduct.getPrice02Max %}
  20.                                     {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}
  21.                                 {% else %}
  22.                                     {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }} ~ {{ RelatedProduct.ChildProduct.getPrice02IncTaxMax|price }}
  23.                                 {% endif %}
  24.                             {% else %}
  25.                                 {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}
  26.                             {% endif %}
  27.                         </p>
  28.                     </a>
  29.                     <span>{{ RelatedProduct.content|raw|purify }}</span>
  30.                 </li>
  31.             {% endif %}
  32.         {% endfor %}
  33.     </ul>
  34. </div>