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.     {% if Product.RelatedProducts.count > 0 %}
  8.         <h3 class="mt-4 mt-md-5 mb-3 pb-2 border-bottom text-secondary">Related Products</h3>
  9.         <ul class="ec-shelfGrid">
  10.             {% for RelatedProduct in Product.RelatedProducts %}
  11.                 {% set ChildProduct = RelatedProduct.ChildProduct %}
  12.                 {% if ChildProduct.Status.id == constant("Eccube\\Entity\\Master\\ProductStatus::DISPLAY_SHOW") %}
  13.                     <li class="ec-shelfGrid__item">
  14.                         <a href="{{ url('product_detail', {id : ChildProduct.id}) }}">
  15.                             <p class="ec-shelfGrid__item-image">
  16.                                 <img src="{{ asset(RelatedProduct.ChildProduct.main_list_image|no_image_product, 'save_image') }}">
  17.                             </p>
  18.                             <p>{{ RelatedProduct.ChildProduct.name }}</p>
  19.                             <p>
  20.                                 {% if RelatedProduct.ChildProduct.hasProductClass %}
  21.                                     {% if RelatedProduct.ChildProduct.getPrice02Min == RelatedProduct.ChildProduct.getPrice02Max %}
  22.                                         {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}
  23.                                     {% else %}
  24.                                         {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }} ~ {{ RelatedProduct.ChildProduct.getPrice02IncTaxMax|price }}
  25.                                     {% endif %}
  26.                                 {% else %}
  27.                                     {{ RelatedProduct.ChildProduct.getPrice02IncTaxMin|price }}
  28.                                 {% endif %}
  29.                             </p>
  30.                         </a>
  31.                         <span>{{ RelatedProduct.content|raw|purify }}</span>
  32.                     </li>
  33.                 {% endif %}
  34.             {% endfor %}
  35.         </ul>
  36.     {% endif %}
  37. </div>