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

Open in your IDE?
  1. {# 
  2.   * 
  3.   * カスタムテンプレができないので強制修正 
  4.   * 
  5. #}
  6. <script>
  7.   $(function () {
  8.     // $('#RelatedProduct-product_area').appendTo($('.ec-layoutRole__main, .ec-layoutRole__mainWithColumn, .ec-layoutRole__mainBetweenColumn'));
  9.     $('#RelatedProduct-product_area').appendTo($('#blockRelatedProduct'));
  10.   });
  11. </script>
  12. <div id="RelatedProduct-product_area" class="ec-shelfRole">
  13.   <h3 class="title-bottom-line mt-3">関連商品</h3>
  14.   <div class="slide-wrap product-list">
  15.     {% for RelatedProduct in Product.RelatedProducts %}
  16.       {% set ChildProduct = RelatedProduct.ChildProduct %}
  17.       <div class="side-box">
  18.         <div class="inner">
  19.           {% if ChildProduct.Status.id == constant("Eccube\\Entity\\Master\\ProductStatus::DISPLAY_SHOW") %}
  20.             <a href="{{ url('product_detail', {id : ChildProduct.id}) }}">
  21.               <p class="ec-shelfGrid__item-image">
  22.                 <img src="{{ asset(RelatedProduct.ChildProduct.main_list_image|no_image_product, 'save_image') }}">
  23.               </p>
  24.               <p>{{ RelatedProduct.ChildProduct.name }}</p>
  25.               <p class="price02_default">
  26.                 {% if RelatedProduct.ChildProduct.hasProductClass %}
  27.                   {% if RelatedProduct.ChildProduct.getPrice02Min == RelatedProduct.ChildProduct.getPrice02Max %}
  28.                     {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}
  29.                   {% else %}
  30.                     {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }} ~ {{ RelatedProduct.ChildProduct.getPrice02IncTaxMax|price }}
  31.                   {% endif %}
  32.                 {% else %}
  33.                   {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}
  34.                 {% endif %}
  35.               </p>
  36.             </a>
  37.           {% endif %}
  38.         </div>
  39.       </div>
  40.     {% endfor %}
  41.   </div>
  42. </div>
  43. {# 
  44. <script>
  45.     $(function () {
  46.         $('#RelatedProduct-product_area').appendTo($('.ec-layoutRole__main, .ec-layoutRole__mainWithColumn, .ec-layoutRole__mainBetweenColumn'));
  47.     });
  48. </script>
  49. <div id="RelatedProduct-product_area" class="ec-shelfRole">
  50.     <ul class="ec-shelfGrid">
  51.         {% for RelatedProduct in Product.RelatedProducts %}
  52.             {% set ChildProduct = RelatedProduct.ChildProduct %}
  53.             {% if ChildProduct.Status.id == constant("Eccube\\Entity\\Master\\ProductStatus::DISPLAY_SHOW") %}
  54.                 <li class="ec-shelfGrid__item">
  55.                     <a href="{{ url('product_detail', {id : ChildProduct.id}) }}">
  56.                         <p class="ec-shelfGrid__item-image">
  57.                             <img src="{{ asset(RelatedProduct.ChildProduct.main_list_image|no_image_product, 'save_image') }}">
  58.                         </p>
  59.                         <p>{{ RelatedProduct.ChildProduct.name }}</p>
  60.                         <p>
  61.                             {% if RelatedProduct.ChildProduct.hasProductClass %}
  62.                                 {% if RelatedProduct.ChildProduct.getPrice02Min == RelatedProduct.ChildProduct.getPrice02Max %}
  63.                                     {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}
  64.                                 {% else %}
  65.                                     {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }} ~ {{ RelatedProduct.ChildProduct.getPrice02IncTaxMax|price }}
  66.                                 {% endif %}
  67.                             {% else %}
  68.                                 {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}
  69.                             {% endif %}
  70.                         </p>
  71.                     </a>
  72.                     <span>{{ RelatedProduct.content|raw }}</span>
  73.                 </li>
  74.             {% endif %}
  75.         {% endfor %}
  76.     </ul>
  77. </div>
  78.  #}