app/template/plugin/RelatedProduct42/front/related_product.twig line 1

Open in your IDE?
  1. <script>
  2.     $(function () {
  3.         $('#related_product_area').appendTo($('#item_detail'));
  4.         $('.related_product_carousel').slick({
  5.             infinite: false,
  6.             speed: 300,
  7.             prevArrow:'<button type="button" class="slick-prev"><span class="angle-circle"><svg class="cb cb-angle-right"><use xlink:href="#cb-angle-right" /></svg></span></button>',
  8.             nextArrow:'<button type="button" class="slick-next"><span class="angle-circle"><svg class="cb cb-angle-right"><use xlink:href="#cb-angle-right" /></svg></span></button>',
  9.             slidesToShow: 4,   // 一画面に表示する関連商品の数
  10.             slidesToScroll: 4, // スクロール時に移動する関連商品の数
  11.             responsive: [
  12.                 {
  13.                     breakpoint: 768,
  14.                     settings: {
  15.                         slidesToShow: 3,  // (スマホ画面)一画面に表示する関連商品の数
  16.                         slidesToScroll: 3 // (スマホ画面)スクロール時に移動する関連商品の数
  17.                     }
  18.                 }
  19.             ]
  20.         });
  21.     });
  22. </script>
  23. <div id="related_product_area" class="row">
  24.     <div class="col-sm-12">
  25.         <h2 class="heading03">関連商品</h2>
  26.         <div class="related_product_carousel">
  27.             {% for RelatedProduct in Product.RelatedProducts %}
  28.                 {% set ChildProduct = RelatedProduct.ChildProduct %}
  29.                 {% if ChildProduct.Status.id == constant("Eccube\\Entity\\Master\\ProductStatus::DISPLAY_SHOW") %}
  30.                     <div class="product_item">
  31.                         <a href="{{ url('product_detail', {id : ChildProduct.id}) }}">
  32.                             <div class="item_photo">
  33.                                 <img src="{{ asset(RelatedProduct.ChildProduct.main_list_image|no_image_product, 'save_image') }}">
  34.                             </div>
  35.                             <dl>
  36.                                 <dt class="item_name">{{ RelatedProduct.ChildProduct.name }}</dt>
  37.                                 <dd class="item_price">
  38.                                     {% if RelatedProduct.ChildProduct.hasProductClass %}
  39.                                         {% if RelatedProduct.ChildProduct.getPrice02Min == RelatedProduct.ChildProduct.getPrice02Max %}
  40.                                             {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}<small>(税込)</small>
  41.                                         {% else %}
  42.                                             {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}<small>(税込)</small> ~ {{ RelatedProduct.ChildProduct.getPrice02IncTaxMax|price }}<small>(税込)</small>
  43.                                         {% endif %}
  44.                                     {% else %}
  45.                                         {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}<small>(税込)</small>
  46.                                     {% endif %}
  47.                                 </dd>
  48.                                 <dd class="item_comment">{{ RelatedProduct.content|raw|purify }}</dd>
  49.                             </dl>
  50.                         </a>
  51.                     </div>
  52.                 {% endif %}
  53.             {% endfor %}
  54.         </div>
  55.     </div>
  56. </div>