Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% assign featured = section.settings.home_page_featured_products %}
- {% assign products_per_row = 3 %}
- {% assign rows = section.settings.home_featured_products_row_num %}
- {% assign total_products = products_per_row | times: rows %}
- {% unless settings.home_section_1 == 'banner-image' %}
- <hr class="medium-up--hide hr--clear hr--small">
- {% endunless %}
- <div class="featured-products">
- {% if section.settings.title != blank %}
- <h2 class="small--text-center">{{ section.settings.title | escape }}</h2>
- {% endif %}
- <div class="grid grid--uniform" role="list">
- {% for product in collections[featured].products limit: total_products %}
- {% include 'product-grid-item' %}
- {% else %}
- {% comment %}
- If collection is empty, show onboarding state
- For onboarding new users to your theme, we add some default products and onboarding tutorials to help populate their store
- {% endcomment %}
- {% unless onboardingLoaded %}
- {% comment %}
- Only load onboarding styles if they have not already been loaded.
- {% endcomment %}
- {% assign onboardingLoaded = true %}
- {% endunless %}
- <div class="grid__item">
- <div class="grid grid--uniform">
- {% for i in (1..total_products) %}
- <div class="grid__item product medium-up--one-third small--one-half text-center">
- <a href="/admin/products" class="product__image-wrapper">
- {% capture current %}{% cycle 1, 2, 3, 4, 5, 6 %}{% endcapture %}
- {{ 'product-' | append: current | placeholder_svg_tag: 'placeholder-svg' }}
- </a>
- <div class="product__title"><a href="/admin/products">{{ 'homepage.onboarding.product_title' | t | capitalize }}</a></div>
- <div class="product__price">$19.99</div>
- </div>
- {% endfor %}
- </div>
- </div>
- {% endfor %}
- </div>
- </div>
- {% schema %}
- {
- "name": {
- "cs": "Propagovaná kolekce",
- "da": "Udvalgt kollektion",
- "de": "Vorgestellte Kategorie",
- "en": "Featured collection",
- "es": "Colección destacada",
- "fi": "Esittelyssä oleva kokoelma",
- "fr": "Collection en vedette",
- "it": "Collezione in evidenza",
- "ja": "特集コレクション",
- "ko": "추천 컬렉션",
- "nb": "Utvalgt samling",
- "nl": "Uitgelichte collectie",
- "pl": "Polecana kolekcja",
- "pt-BR": "Coleção em destaque",
- "pt-PT": "Coleção em destaque",
- "sv": "Utvald kollektion",
- "th": "คอลเลกชันแนะนำ",
- "tr": "Öne çıkan koleksiyon",
- "vi": "Bộ sưu tập nổi bật",
- "zh-CN": "特色产品系列",
- "zh-TW": "精選商品系列"
- },
- "settings": [
- {
- "type": "text",
- "id": "title",
- "label": {
- "cs": "Nadpis",
- "da": "Overskrift",
- "de": "Überschrift",
- "en": "Heading",
- "es": "Título",
- "fi": "Otsake",
- "fr": "Titre",
- "it": "Heading",
- "ja": "見出し",
- "ko": "제목",
- "nb": "Overskrift",
- "nl": "Kop",
- "pl": "Nagłówek",
- "pt-BR": "Título",
- "pt-PT": "Título",
- "sv": "Rubrik",
- "th": "ส่วนหัว",
- "tr": "Başlık",
- "vi": "Tiêu đề",
- "zh-CN": "标题",
- "zh-TW": "標題"
- },
- "default": {
- "cs": "Propagovaná kolekce",
- "da": "Udvalgt kollektion",
- "de": "Vorgestellte Kategorie",
- "en": "Featured collection",
- "es": "Colección destacada",
- "fi": "Esittelyssä oleva kokoelma",
- "fr": "Collection en vedette",
- "it": "Collezione in evidenza",
- "ja": "特集コレクション",
- "ko": "추천 컬렉션",
- "nb": "Fremhevet samling",
- "nl": "Uitgelichte collectie",
- "pl": "Polecana kolekcja",
- "pt-BR": "Coleção em destaque",
- "pt-PT": "Coleção em destaque",
- "sv": "Utvald kollektion",
- "th": "คอลเลกชันแนะนำ",
- "tr": "Öne çıkan koleksiyon",
- "vi": "Bộ sưu tập nổi bật",
- "zh-CN": "特色产品系列",
- "zh-TW": "精選商品系列"
- }
- },
- {
- "type": "collection",
- "id": "home_page_featured_products",
- "label": {
- "cs": "Kolekce",
- "da": "Kollektion",
- "de": "Kategorie",
- "en": "Collection",
- "es": "Colección",
- "fi": "Kokoelma",
- "fr": "Collection",
- "it": "Collezione",
- "ja": "コレクション",
- "ko": "컬렉션",
- "nb": "Samling",
- "nl": "Collectie",
- "pl": "Kolekcja",
- "pt-BR": "Coleção",
- "pt-PT": "Coleção",
- "sv": "Produktserie",
- "th": "คอลเลกชัน",
- "tr": "Koleksiyon",
- "vi": "Bộ sưu tập",
- "zh-CN": "收藏",
- "zh-TW": "商品系列"
- }
- },
- {
- "type": "range",
- "id": "home_featured_products_row_num",
- "label": {
- "cs": "Řádky",
- "da": "Rækker",
- "de": "Reihen",
- "en": "Rows",
- "es": "Filas",
- "fi": "Rivit",
- "fr": "Rangées",
- "it": "Righe",
- "ja": "行",
- "ko": "열",
- "nb": "Rader",
- "nl": "Rijen",
- "pl": "Wiersze",
- "pt-BR": "Linhas",
- "pt-PT": "Linhas",
- "sv": "Rader",
- "th": "แถว",
- "tr": "Satırlar",
- "vi": "Hàng",
- "zh-CN": "行数",
- "zh-TW": "列"
- },
- "min": 1,
- "max": 10,
- "step": 1,
- "default": 2
- }
- ],
- "presets": [
- {
- "name": {
- "cs": "Propagovaná kolekce",
- "da": "Udvalgt kollektion",
- "de": "Vorgestellte Kategorie",
- "en": "Featured collection",
- "es": "Colección destacada",
- "fi": "Esittelyssä oleva kokoelma",
- "fr": "Collection en vedette",
- "it": "Collezione in evidenza",
- "ja": "特集コレクション",
- "ko": "추천 컬렉션",
- "nb": "Utvalgt samling",
- "nl": "Uitgelichte collectie",
- "pl": "Polecana kolekcja",
- "pt-BR": "Coleção em destaque",
- "pt-PT": "Coleção em destaque",
- "sv": "Utvald kollektion",
- "th": "คอลเลกชันแนะนำ",
- "tr": "Öne çıkan koleksiyon",
- "vi": "Bộ sưu tập nổi bật",
- "zh-CN": "特色产品系列",
- "zh-TW": "精選商品系列"
- },
- "category": {
- "cs": "Kolekce",
- "da": "Kollektion",
- "de": "Kategorie",
- "en": "Collection",
- "es": "Colección",
- "fi": "Kokoelma",
- "fr": "Collection",
- "it": "Collezione",
- "ja": "コレクション",
- "ko": "컬렉션",
- "nb": "Samling",
- "nl": "Collectie",
- "pl": "Kolekcja",
- "pt-BR": "Coleção",
- "pt-PT": "Coleção",
- "sv": "Produktserie",
- "th": "คอลเลกชัน",
- "tr": "Koleksiyon",
- "vi": "Bộ sưu tập",
- "zh-CN": "收藏",
- "zh-TW": "商品系列"
- }
- }
- ],
- "blocks": []
- }
- {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement