igb 6 місяців тому
батько
коміт
740bb542f3

+ 11 - 5
resources/views/liquid_src/1/TechVista/products_detail.liquid

@@ -58,15 +58,21 @@
                                         <div id="slideshow_thumbs" class="swiper-js-container gallery-thumbs gallery-thumbs--style-1 mt-4">
                                             <div class="swiper-container" data-swiper-items="5" data-swiper-space-between="10" data-swiper-xs-items="3" data-swiper-xs-space-between="10" data-swiper-sm-items="4" data-swiper-sm-space-between="10">
                                                 <div class="swiper-wrapper">
-
-                                                    {% for item in product.images %}
+                                                    {% if product.images and product.images.size > 0 %}
+                                                        {% for item in product.images %}
                                                         <div class="swiper-slide">
                                                             <a href="{{ site.image_base_url }}{{ item.image_url }}?x-oss-process=image/resize,w_500,m_lfit" data-desoslide-index="{{ forloop.index0 }}">
                                                                 <img src="{{ site.image_base_url }}{{ item.image_url }}?x-oss-process=image/resize,m_pad,w_100,h_100" alt="{{ product.title }}">
                                                             </a>
                                                         </div>
-                                                    {% endfor %}
-
+                                                        {% endfor %}
+                                                    {% else %}
+                                                        <div class="swiper-slide">
+                                                            <a href="/static/images/product_default.jpg" data-desoslide-index="0">
+                                                                <img src="/static/images/product_default.jpg" alt="Default Product">
+                                                            </a>
+                                                        </div>
+                                                    {% endif %}
                                                 </div>
                                             </div>
                                         </div>
@@ -137,7 +143,6 @@
                                             <h3 class="heading heading-6 strong-600">     Description:</h3>
 
 
-
                                             <p>
                                                 {{product.content | raw }}
                                             </p>
@@ -167,6 +172,7 @@
     <h4 >Get a quote</h4>
     <form id="form_contact" data-action="/contact" class="form-default" role="form">
         <input type="hidden" name="_token" value="{{ csrf_token }}">
+        <input type="hidden" name="consulting_products" value="{{ product.title }} }}">
         <div class="row">
             <div class="col-md-6">
                 <div class="form-group has-feedback">