Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 8.22 KB | None | 0 0
  1. <div data-section-id="{{ section.id }}" data-section-type="filter-products-section">
  2.   <!-- style custom -->
  3.   <style>
  4.     #filter-products-{{ section.id }}.box_product,
  5.     #filter-products-{{ section.id }}.box_product h3.title-widget span.inner{
  6.       background-color: {{ section.settings.bg_section_color }};
  7.     }
  8.     #filter-products-{{ section.id }} .products-collection h3.title-widget{
  9.       color: {{ section.settings.title_color }};
  10.     }
  11.   </style>
  12.   <!-- end style custom -->
  13.   <div id="filter-products-{{ section.id }}" class="box_product">
  14.     <div class="container">
  15.       <div class="products-collection {% if settings.style_product_view == '1' %}product_type_1{% endif %}{% if settings.style_product_view == '2' %}product_type_2{% endif %}{% if settings.style_product_view == '3' %}product_type_3{% endif %}{% if settings.style_product_view == '4' %}product_type_4{% endif %}">
  16.         {% if section.settings.title != '' %}
  17.         <h3 class="title-widget">
  18.           <span class="inner">
  19.             {% if settings.language_enable %}
  20.             <span class="lang1">{{ section.settings.title | split: '|' | first }}</span>
  21.             <span class="lang2">{{ section.settings.title | split: '|' | last }}</span>
  22.             {% else %}
  23.             {{ section.settings.title | split: '|' | first }}
  24.             {% endif %}
  25.           </span>
  26.         </h3>
  27.         {% endif %}
  28.         {% if section.settings.collection_text != '' %}
  29.         <p class="description">
  30.           <span>
  31.             {% if settings.language_enable %}
  32.             <span class="lang1">{{ section.settings.collection_text | split: '|' | first }}</span>
  33.             <span class="lang2">{{ section.settings.collection_text | split: '|' | last }}</span>
  34.             {% else %}
  35.             {{ section.settings.collection_text | split: '|' | first }}
  36.             {% endif %}
  37.           </span>
  38.         </p>
  39.         {% endif %}
  40.         <div class="category-products">
  41.           {%- assign carousel = section.settings.collection_carousel -%}
  42.           {%- assign limit = section.settings.collection_limit -%}  
  43.           {%- assign name_collection = section.settings.collection -%}
  44.           {%- if name_collection == blank -%}{%- assign name_collection = "all" -%}{%- endif -%}
  45.           {%- assign collection = collections[name_collection] -%}
  46.           <div class="data-carousel"  
  47.               data-auto="{{ section.settings.collection_autoplay }}"
  48.               data-items="{{ section.settings.collection_column }}"
  49.               data-1200="{{ section.settings.collection_column }}"
  50.               data-992="4"
  51.               data-768="3"
  52.               data-640="2"
  53.               data-480="2"
  54.               data-320="2"
  55.               data-nav="{{ section.settings.collection_product_show_nav }}"
  56.               data-prev='{{ section.settings.collection_product_nav_prev}}'
  57.               data-next='{{ section.settings.collection_product_nav_next}}'
  58.               data-paging="{{ section.settings.collection_show_paging }}"
  59.               data-margin='{{ section.settings.collection_item_margin }}' style="display: none;"></div>
  60.           {% if collection.products.size == 0 %}
  61.           <p style="text-align:center;color:#999;padding: 5px 10px;font-style:italic;" {% if settings.language_enable %}data-translate="products.general.no_more_product"{% endif %}>{{ 'products.general.no_more_product' | t }}</p>
  62.           {% else %}
  63.           {% if carousel %}
  64.           <div class="products-grid owl-carousel {% if section.settings.hide_actions != blank %}hide-action{% endif %}{% if section.settings.nav_position == '1' %}center_nav{% endif %} {% if section.settings.paginate_position == '0' %}top_paginate{% endif %} {% if section.settings.move_actions != blank %}move-action{% endif %}">
  65.             {% for product in collection.products limit: limit %}  
  66.             <div class="item product">
  67.               {% include 'owl-lazyload-product-grid-item' %}
  68.             </div>
  69.             {% endfor %}  
  70.           </div>
  71.           {% else %}
  72.           <ul class="products-grid columns{{section.settings.collection_column}} {% if section.settings.collection_flex_grid != blank %}flex-grid{% endif %} {% if section.settings.move_actions != blank %}move-action{% endif %} {% if section.settings.hide_actions != blank %}hide-action{% endif %}">
  73.             {% for product in collection.products limit: limit %}  
  74.             <li class="item product product-layout-grid">
  75.               {% include 'lazyload-product-grid-item' %}
  76.             </li>
  77.             {% endfor %}
  78.             <div style="clear:both;"></div>
  79.           </ul>
  80.           {% endif %}
  81.           {% endif %}
  82.         </div>
  83.       </div>
  84.     </div>
  85.   </div>
  86. </div>
  87. {% schema %}
  88. {
  89.   "name": "Collection Products",
  90.   "settings": [
  91.     {
  92.       "type": "header",
  93.       "content": "Color"
  94.     },
  95.     {
  96.       "type": "color",
  97.       "id": "bg_section_color",
  98.       "label": "Background Section Color",
  99.       "default": "#fff"
  100.     },
  101.     {
  102.       "type": "color",
  103.       "id": "title_color",
  104.       "label": "Title Collection Color",
  105.       "default": "#313131"
  106.     },
  107.     {
  108.       "type": "header",
  109.       "content": "Config"
  110.     },
  111.     {
  112.       "type": "text",
  113.       "id": "title",
  114.       "label": "Collection Title",
  115.       "default": "FEATURED PRODUCTS"
  116.     },
  117.     {
  118.       "type": "text",
  119.       "id": "collection_text",
  120.       "label": "Collection Text"
  121.     },
  122.     {
  123.       "type": "collection",
  124.       "id": "collection",
  125.       "label": "Collection"
  126.     },
  127.     {
  128.       "type": "text",
  129.       "id": "collection_limit",
  130.       "label": "Number of products to show",
  131.       "default": "8"
  132.     },  
  133.     {
  134.       "type": "text",
  135.       "id": "collection_column",
  136.       "label": "Products per row",
  137.       "default": "4"
  138.     },  
  139.     {
  140.       "type": "checkbox",
  141.       "id": "hide_actions",
  142.       "label": "Hide Action Links",
  143.       "default": false
  144.     },
  145.     {
  146.       "type": "checkbox",
  147.       "id": "collection_flex_grid",
  148.       "label": "Flex Grid",
  149.       "default": false
  150.     },
  151.     {
  152.       "type": "checkbox",
  153.       "id": "move_actions",
  154.       "label": "Move Actions",
  155.       "info": "If yes, all of the action links that 'Add to Cart' button, 'Add to Compare' link and 'Add to Wishlist' link will be moved into the product image area.",
  156.       "default": false
  157.     },
  158.     {
  159.       "type": "checkbox",
  160.       "id": "collection_carousel",
  161.       "label": "Enable Carousel",
  162.       "info": "Use for only default layout and don't show more button.",
  163.       "default": true
  164.     },
  165.     {
  166.       "type": "text",
  167.       "id": "collection_autoplay",
  168.       "label": "Slideshow",
  169.       "info": "Change to any integrer for example 5000 to play every 5 seconds. Leave empty to disable autoplay.",
  170.       "default": "5000"
  171.     },
  172.     {
  173.       "type": "checkbox",
  174.       "id": "collection_show_paging",
  175.       "label": "Show Paging"
  176.     },
  177.     {
  178.       "type": "select",
  179.       "id": "paging_position",
  180.       "label": "Paging Position",
  181.       "options": [
  182.         {
  183.           "value": "0",
  184.           "label": "Top"
  185.         },
  186.         {
  187.           "value": "1",
  188.           "label": "Bottom"
  189.         }
  190.       ],
  191.       "default": "0"
  192.     },
  193.     {
  194.       "type": "checkbox",
  195.       "id": "collection_product_show_nav",
  196.       "label": "Show Navigation",
  197.       "default": true
  198.     },
  199.     {
  200.       "type": "select",
  201.       "id": "nav_position",
  202.       "label": "Navigation Position",
  203.       "options": [
  204.         {
  205.           "value": "0",
  206.           "label": "Top"
  207.         },
  208.         {
  209.           "value": "1",
  210.           "label": "Side"
  211.         }
  212.       ],
  213.       "default": "0"
  214.     },
  215.     {
  216.       "type": "text",
  217.       "id": "collection_product_nav_prev",
  218.       "label": "Prev Navigation",
  219.       "default": "<i class=\"icon-left-open\"><\/i>"
  220.     },
  221.     {
  222.       "type": "text",
  223.       "id": "collection_product_nav_next",
  224.       "label": "Next Navigation",
  225.       "default": "<i class=\"icon-right-open\"><\/i>"
  226.     },
  227.     {
  228.       "type": "text",
  229.       "id": "collection_item_margin",
  230.       "label": "Margin",
  231.       "info": "Margin each item.",
  232.       "default": "30"
  233.     }
  234.   ],
  235.   "presets": [
  236.     {
  237.       "name": "Collection Products",
  238.       "category": "Products"
  239.     }
  240.   ]
  241. }
  242. {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement