templates/front/include/products_category.html.twig line 1

  1. <!-- product section start -->
  2. <section class="ratio_asos section-b-space overflow-hidden d-print-none">
  3.     <div class="container-fluid p-0">
  4.         <div class="header-image-contain mb-0 section-b-space">
  5.             <div class="title title1 text-center">
  6.                 <h2>Proizvodi iz iste kategorije</h2>
  7.             </div>
  8.             <div class="contain-image-box overflow-hidden">
  9.                 <section class="ratio_asos pt-3">
  10.                     <div class="container-fluid p-0">
  11.                         <div class="row m-0">
  12.                             <div class="col-sm-12 p-0">
  13.                                 <div class="product-wrapper slide-6">
  14.                                     {% if (randomProducts is defined) and (randomProducts | length > 0) %}
  15.                                     {% for product in randomProducts %}
  16.                                     <div>
  17.                                         <div class="product-box">
  18.                                             <div class="img-wrapper">
  19.                                                 <a href="{{ path('app_shop_product_view', {id: product.id}) }}">
  20.                                                     <img src="{{ asset(product.thumbnail500) }}"
  21.                                                          class="bg-img blur-up lazyload" alt="">
  22.                                                 </a>
  23.                                                 <div class="label-block">
  24.                                                     {% if product.new %}
  25.                                                         <span class="label label-black">Novo</span>
  26.                                                     {% endif %}
  27.                                                     {% if product.discount %}
  28.                                                         <span class="label label-theme">Popust</span>
  29.                                                     {% endif %}
  30.                                                     {% if product.superProduct %}
  31.                                                         <span class="label label-theme">Super proizvod</span>
  32.                                                     {% endif %}
  33.                                                     {% if product.outOfStock %}
  34.                                                         <span class="label label-theme">Nema na stanju</span>
  35.                                                     {% endif %}
  36.                                                     {% if product.isOutlet %}
  37.                                                         <span class="label label-black">Outlet</span>
  38.                                                     {% endif %}
  39.                                                 </div>
  40.                                                 <div class="cart-wrap">
  41.                                                     <ul>
  42.                                                         <li>
  43.                                                             {% if not product.outOfStock %}
  44.                                                                 <form id="add-to-cart-form-{{ product.id }}" class="add-to-cart-form" method="POST" action="{{ path('app_cart_add') }}">
  45.                                                                     <input type="hidden" name="pid" value="{{ product.id }}">
  46.                                                                     <input type="hidden" name="quantity" value="1">
  47.                                                                     <a href="" class="addtoKorpa-btn"
  48.                                                                        data-product-id="{{ product.id }}">
  49.                                                                         <i data-feather="shopping-cart"></i>
  50.                                                                     </a>
  51.                                                                 </form>
  52.                                                             {% endif %}
  53.                                                         </li>
  54. {#                                                        <li>#}
  55. {#                                                            <a href="javascript:void(0)" data-bs-toggle="modal"#}
  56. {#                                                               data-bs-target="#quick-view_{{ product.id }}">#}
  57. {#                                                                <i data-feather="eye"></i>#}
  58. {#                                                            </a>#}
  59. {#                                                        </li>#}
  60.                                                         {% if app.user %}
  61.                                                             <li>
  62.                                                                 <a href="" class="zelja" id="zelja_{{ product.id }}"  data-product-id="{{ product.id }}">
  63.                                                                     <i data-feather="heart"></i>
  64.                                                                 </a>
  65.                                                             </li>
  66.                                                         {% endif %}
  67.                                                     </ul>
  68.                                                 </div>
  69.                                             </div>
  70.                                             <div class="product-details text-center">
  71.                                                                                                 {% if product.discount %}
  72.                                                                                                     <h3 class="theme-color">
  73.                                                                                                         {{ ((product.pricePDV  | number_format(2, '.', ','))) }} RSD
  74.                                                                                                         <span class="font-light ml-1">{{ ((product.price * ((product.vat/100) + 1)) | round)  | number_format(2, '.', ',') }} RSD</span>
  75.                                                                                                     </h3>
  76.                                                                                                 {% else %}
  77.                                                                                                     <h3 class="theme-color">
  78.                                                                                                         {{ ((product.pricePDV  | number_format(2, '.', ','))) }} RSD
  79.                                                                                                     </h3>
  80.                                                                                                 {% endif %}
  81.                                                                                                 <a href="{{ path('app_shop_product_view', {id: product.id}) }}" class="font-default">
  82.                                                                                                     <h6>{{ product.title }}</h6>
  83.                                                                                                 </a>
  84.                                                                                                 {{ getRating(product.id) | raw }}
  85.                                                                                             </div>
  86.                                         </div>
  87.                                     </div>
  88. {#                                        <div class="modal fade quick-view-modal" id="quick-view_{{ product.id }}">#}
  89. {#                                            <div class="modal-dialog modal-lg modal-dialog-centered">#}
  90. {#                                                <div class="modal-content">#}
  91. {#                                                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>#}
  92. {#                                                    <div class="modal-body">#}
  93. {#                                                        <div class="row gy-4">#}
  94. {#                                                            <div class="col-lg-6">#}
  95. {#                                                                <div class="quick-view-image">#}
  96. {#                                                                    <div class="quick-view-slider">#}
  97. {#                                                                        <div>#}
  98. {#                                                                            <img src="{{ asset(product.mainImage.thumbnail500) }}"#}
  99. {#                                                                                 class="img-fluid blur-up lazyload" alt="">#}
  100. {#                                                                        </div>#}
  101. {#                                                                        {% if not product.image.empty %}#}
  102. {#                                                                            {% for img in product.image %}#}
  103. {#                                                                                <div>#}
  104. {#                                                                                    <img src="{{ asset(img.thumbnail500) }}"#}
  105. {#                                                                                         class="img-fluid blur-up lazyload" alt="">#}
  106. {#                                                                                </div>#}
  107. {#                                                                            {% endfor %}#}
  108. {#                                                                        {% endif %}#}
  109. {#                                                                    </div>#}
  110. {#                                                                    <div class="quick-nav">#}
  111. {#                                                                        <div>#}
  112. {#                                                                            <img src="{{ asset(product.mainImage.thumbnail100) }}"#}
  113. {#                                                                                 class="img-fluid blur-up lazyload" alt="">#}
  114. {#                                                                        </div>#}
  115. {#                                                                        {% if not product.image.empty %}#}
  116. {#                                                                            {% for img in product.image %}#}
  117. {#                                                                                <div>#}
  118. {#                                                                                    <img src="{{ asset(img.thumbnail100) }}"#}
  119. {#                                                                                         class="img-fluid blur-up lazyload" alt="">#}
  120. {#                                                                                </div>#}
  121. {#                                                                            {% endfor %}#}
  122. {#                                                                        {% endif %}#}
  123. {#                                                                    </div>#}
  124. {#                                                                </div>#}
  125. {#                                                            </div>#}
  126. {#                                                            <div class="col-lg-6">#}
  127. {#                                                                <div class="product-right">#}
  128. {#                                                                    <h4 class="mb-2">{{ product.title }}</h4>#}
  129. {#                                                                    {{ getRating(product) | raw }}#}
  130. {#                                                                    {% if product.discount %}#}
  131. {#                                                                        <h4 class="price-detail">{{ ((product.pricePDV  | number_format(2, '.', ','))) }} din#}
  132. {#                                                                            <del>{{ ((product.price * ((product.vat/100) + 1)) | round)  | number_format(2, '.', ',') }} din</del>#}
  133. {#                                                                        </h4>#}
  134. {#                                                                    {% else %}#}
  135. {#                                                                        <h4 class="price-detail">{{ ((product.pricePDV  | number_format(2, '.', ','))) }} din</h4>#}
  136. {#                                                                    {% endif %}#}
  137. {#                                                                    <div class="label-section">#}
  138. {#                                                                        {% if product.new %}#}
  139. {#                                                                            <span class="label label-black">Novo</span>#}
  140. {#                                                                        {% endif %}#}
  141. {#                                                                        {% if product.discount %}#}
  142. {#                                                                            <span class="label label-theme">Popust</span>#}
  143. {#                                                                        {% endif %}#}
  144. {#                                                                        {% if product.superProduct %}#}
  145. {#                                                                            <span class="label label-theme">Super proizvod</span>#}
  146. {#                                                                        {% endif %}#}
  147. {#                                                                        {% if product.outOfStock %}#}
  148. {#                                                                            <span class="label label-theme">Nema na stanju</span>#}
  149. {#                                                                        {% else %}#}
  150. {#                                                                            <span class="label label-theme">Dostupno</span>#}
  151. {#                                                                        {% endif %}#}
  152. {#                                                                    </div>#}
  153. {#                                                                    <div class="product-details">#}
  154. {#                                                                        <h4 class="product-title size-text">Šifra proizvoda</h4>#}
  155. {#                                                                        <div class="size-box">#}
  156. {#                                                                            <h6 class="product-title hurry-title d-block">#{{ product.sku }}</h6>#}
  157. {#                                                                        </div>#}
  158. {#                                                                        <h4 class="product-title size-text">Kategorija</h4>#}
  159. {#                                                                        <div class="size-box">#}
  160. {#                                                                            <h4 class="product-title hurry-title d-block">{{ product.category.title }}</h4>#}
  161. {#                                                                        </div>#}
  162. {#                                                                    </div>#}
  163. {#                                                                    <form id="add-to-cart-form-modal-{{ product.id }}" class="add-to-cart-form" method="POST" action="{{ path('app_cart_add') }}">#}
  164. {#                                                                        <div class="product-btns">#}
  165. {#                                                                            <input type="hidden" name="pid" value="{{ product.id }}">#}
  166. {#                                                                            <input type="hidden" name="quantity" value="1">#}
  167. {#                                                                            {% if product.outOfStock %}#}
  168. {#                                                                                <button type="submit" class="addtoKorpaModal-btn btn btn-solid-default btn-sm" disabled>Dodajte u korpu</button>#}
  169. {#                                                                            {% else %}#}
  170. {#                                                                                <button type="submit" class="addtoKorpaModal-btn btn btn-solid-default btn-sm">Dodajte u korpu</button>#}
  171. {#                                                                            {% endif %}#}
  172. {#                                                                            <a href="{{ path('app_shop_product_view', {id: product.id}) }}"  class="btn btn-solid-default btn-sm">#}
  173. {#                                                                                Vidite detalje#}
  174. {#                                                                            </a>#}
  175. {#                                                                        </div>#}
  176. {#                                                                    </form>#}
  177. {#                                                                </div>#}
  178. {#                                                            </div>#}
  179. {#                                                        </div>#}
  180. {#                                                    </div>#}
  181. {#                                                </div>#}
  182. {#                                            </div>#}
  183. {#                                        </div>#}
  184.                                     {% endfor %}
  185.                                     {% endif %}
  186.                                 </div>
  187.                             </div>
  188.                         </div>
  189.                     </div>
  190.                 </section>
  191.             </div>
  192.         </div>
  193.     </div>
  194. </section>