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.     <div class="ec-shelfRole">
  8.         <!--<h2 class="ec-headingTitle">関連商品</h2>-->
  9. <div class="ttl green mincho"><h2>関連商品</h2></div>
  10.     <ul class="ec-shelfGrid">
  11.         {% for RelatedProduct in Product.RelatedProducts %}
  12.             {% set ChildProduct = RelatedProduct.ChildProduct %}
  13.             {% if ChildProduct.Status.id == constant("Eccube\\Entity\\Master\\ProductStatus::DISPLAY_SHOW") %}
  14.                 <li class="ec-shelfGrid__item">
  15.                     <a href="{{ url('product_detail', {id : ChildProduct.id}) }}">
  16.                         <p class="ec-shelfGrid__item-image">
  17.                             <img src="{{ asset(RelatedProduct.ChildProduct.main_list_image|no_image_product, 'save_image') }}">
  18.                         </p>
  19.                         <p>{{ RelatedProduct.ChildProduct.name }}</p>
  20.                         <p>
  21.                             {% if RelatedProduct.ChildProduct.hasProductClass %}
  22.                                 {% if RelatedProduct.ChildProduct.getPrice02Min == RelatedProduct.ChildProduct.getPrice02Max %}
  23.                                     {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}
  24.                                 {% else %}
  25.                                     {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }} ~ {{ RelatedProduct.ChildProduct.getPrice02IncTaxMax|price }}
  26.                                 {% endif %}
  27.                             {% else %}
  28.                                 {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}
  29.                             {% endif %}
  30.                         </p>
  31.                     </a>
  32.                     <span>{{ RelatedProduct.content|raw|purify }}</span>
  33.                 </li>
  34.             {% endif %}
  35.         {% endfor %}
  36.     </ul>
  37. </div>
  38. </div>