Я пытаюсь добавить скользящий слайдер на страницу продукта, я применил родительский класс 'home_send_gift_card_slider', он не показывает продукты на домашней странице, пожалуйста, помогите. Я пытаюсь добавить скользящий слайдер на страницу продукта, я применили родительский класс 'home_send_gift_card_slider', он не работает должным образом на домашней странице.
<div id="CollectionSection" data-section-id="{{ section.id }}" data-
section-type="collection-template" data-grid-type="{{
section.settings.collection_products_grid }}">
<div class="wrapper">
{% if section.settings.title != blank %}
<div class="section-header text-center">
<h2 class="h1 section-header__title">{{ section.settings.title |
escape }}</h2>
<hr class="hr--small">
</div>
{% endif %}
<div class="{% if section.settings.collection_products_grid == 'collage'
%}grid grid-collage{% else %} grid-uniform {% endif %}">
{% comment %}
Loop through products in your Frontpage collection.
This collection is created by default, but you must add products to
it.
See the snippet 'snippets/product-grid-collage.liquid'.
`is_reverse_row_product`, `three_row_index_product`, `
collection_product_count_product`, and `divisible_by_three_product`
are
all used by 'snippets/product-grid-collage.liquid'
{% endcomment %}
{% if section.settings.home_featured_products == blank or
collections[section.settings.home_featured_products] == empty or
collections[section.settings.home_featured_products].products_count ==
0
%}
{% comment %}
For onboarding new users to your theme, we add some default products
and onboarding tutorials to help populate their store
{% endcomment %}
{% unless emptyState %}
{% assign emptyState = true %}
{% endunless %}
{% include 'onboarding-featured-products' %}
{% else %}
{% if section.settings.collection_products_grid == 'collage' %}
{% assign is_reverse_row__product = false %}
{% assign three_row_index__product = 0 %}
{% if
collections[section.settings.home_featured_products].products_count >
50 %}
{% assign collection_product_count__product = 50 %}
{% else %}
{% assign collection_product_count__product =
collections[section.settings.home_featured_products].products_count %}
{% endif %}
{% assign divisible_by_three__product =
collection_product_count__product | modulo:3 %}
{% for product in
collections[section.settings.home_featured_products].products %}
{% include 'product-grid-collage' %}
{% endfor %}
{% else %}
<div class="home_send_gift_card_slider">
{% assign grid_item_width = 'medium--one-half large--one-quarter' %}
{% for product in
collections[section.settings.home_featured_products].products %}
{% include 'send_gift_product_grid' %}
{% endfor %}
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>
{% schema %}
{
"name": {
"en": "Send a Gift"
},
"class": "index-section home_send_gift_card_sec",
"settings": [
{
"type": "text",
"id": "title",
"label": {
"en": "Heading"
},
"default": {
"en": "Featured collection"
}
},
{
"type": "collection",
"id": "home_featured_products",
"label": {
"en": "Collection"
}
},
{
"type": "select",
"id": "collection_products_grid",
"label": {
"en": "Grid style"
},
"options": [
{
"value": "collage",
"label": {
"en": "Collage"
}
},
{
"value": "grid",
"label": {
"de": "Raster",
"en": "Grid",
"es": "Cuadrícula",
"fr": "Grille",
"it": "Griglia",
"ja": "グリッド",
"nl": "Raster",
"pt-BR": "Grade",
"zh-CN": "网格",
"zh-TW": "網格"
}
}
]
}
],
"presets": [
{
"name": {
"en": "Send a Gift"
},
"category": {
"en": "Collection"
}
}
],
"blocks": []
}
{% endschema %}