Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.45 KB | None | 0 0
  1. {% assign sale_on = false %}
  2. {% if product.compare_at_price_min > product.price_min %}
  3.   {% assign sale_on = true %}
  4. {% endif %}
  5.  
  6. {% comment %} Main Image URL. {% endcomment %}
  7. {% assign main_url_image = product.selected_or_first_available_variant.featured_image | default: product.featured_image %}
  8.  
  9. {% assign PAGE_CONST = "product_custom_page" %}
  10. {% assign current_product = product %}
  11.  
  12. {% assign images_color = '' %}{% for i in (1..10) %}{% assign key = 'filter_color' | append: forloop.index %}{% assign value = '__' | append: settings[key] | handle | downcase | strip | append: '__' | append: forloop.index %}{% assign images_color = images_color | append: value | append: ';' %}{% endfor %}
  13.  
  14. {% if settings.product_page_design == "default" %}
  15. <section class="content offset-top-0">
  16.   <div class="container">
  17.     <div class="row product-info-outer">
  18.  
  19.       {% include "product-switcher" %}
  20.      
  21.       <div class="col-sm-12 col-md-12 col-lg-12 {% if settings.show_productpage_htmlblock %}col-xl-8{% endif %}">
  22.         <div class="row">
  23.           <div class="{% if settings.product_header_type == "default" %}col-sm-6 col-md-6 col-lg-6 col-xl-6{%else%}col-sm-4 col-md-4 col-lg-4 col-xl-4{% endif %} hidden-xs">
  24.             {% include "product-page-gallery" type: "default" %}
  25.           </div>
  26.           <div class="product-info {% if settings.product_header_type == "default" %}col-sm-6 col-md-6 col-lg-6 col-xl-6{%else%}col-sm-8 col-md-8 col-lg-8 col-xl-8{% endif %}">
  27.             {% include "product-page-description" %}
  28.           </div>
  29.         </div>
  30.         {% if settings.product_tabs_work != "design3full" %}<div class="row content{% if settings.product_tabs_work == "design3" %} tabdesign3{% endif %}">{% include "product-page-tabs" %}</div>{% endif %}
  31.       </div>
  32.  
  33.       {% if settings.show_productpage_htmlblock %}<div class="custom-product-block col-xl-4 visible-xl">{{ settings.productpage_htmlblock }}</div>{% endif %}
  34.  
  35.     </div>
  36.  
  37.   </div>
  38. </section>
  39. {% endif %}
  40.  
  41. {% if settings.product_page_design == "design2" %}
  42. {% include "product-page-gallery-2" %}
  43. <section class="content">
  44.   <div class="container">
  45.     <div class="product-info product-info-big text-center product-info-outer">
  46.       {% include "product-switcher" %}
  47.       {% include "product-page-description-2" %}
  48.     </div>
  49.   </div>
  50. </section>
  51. {% endif %}
  52.  
  53.   {% if product.variants[0].option1 != "Default Title" %}
  54.     {% include "swatch-javascript" %}
  55.   {% else %}
  56.     <script>
  57.       if(jQuery('.product-info .product-info__sku .sku').length) {
  58.         if(jQuery('.product-info .product-info__sku .sku').text() == "") {
  59.           var $ava = jQuery(".product-info .product-info__availability");
  60.           if($ava.hasClass('product-info__availability')){ $ava.removeClass('product-info__availability') }
  61.           jQuery('.product-info .product-info__sku').remove();
  62.         }
  63.       }
  64.     </script>
  65.   {% endif %}
  66.  
  67. {% if settings.product_tabs_work == "design3full" or settings.product_page_design == "design2" %}{% include "product-page-tabs2" %}{% endif %}
  68.  
  69.  
  70. {% if settings.show_upsell_collection %}
  71. {% assign name_collection = settings.product_upsell_collection %}
  72. {% if name_collection == blank %}{% assign name_collection = "all" %}{% endif %}{% assign selected_collection = collections[name_collection] %}
  73. {% assign _lenght = settings.product_upsell_collection_count | plus: 0 %}
  74. <!-- related products -->
  75. <section class="content">
  76.   <div class="container">
  77.     <!-- title -->
  78.     <div class="title-with-button">
  79.       <div class="{% if settings.upsell_collection_title_center %}carousel-products__button{% else %}carousel-products__center{% endif %} pull-right"> <span class="btn-prev"></span> <span class="btn-next"></span> </div>
  80.       <h2 class="{% if settings.upsell_collection_title_center %}text-center text-uppercase  title-under{% else %}text-left text-uppercase title-under{% endif %}">{{ settings.product_upsell_collection_title }}</h2>
  81.     </div>
  82.     <!-- /title -->
  83.    
  84.     <!-- carousel -->
  85.     <div class="carousel-products row" id="carouselRelated">
  86.       {% assign _product_id = product.id %}
  87.       {% for product in selected_collection.products limit: _lenght %}{% if _product_id != product.id %}<div class="col-xs-6 col-sm-4 col-md-3 col-lg-3 col-xl-one-six">
  88.         {% include "product-grid-item" collection: selected_collection %}
  89.       </div>{% endif %}{% endfor %}
  90.     </div>
  91.     <!-- /carousel -->
  92.   </div>
  93. </section>
  94. <!-- /related products -->
  95. {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement