Hey @StanSavellis code for the first one. please replace it.
{% if section.settings.hide_if_empty == false or section.settings.product_list != blank %}
{%- liquid
if section.settings.enable_carousel == true
assign show_carousel_nav = true
if section.settings.product_list != blank and section.settings.product_list.size <= section.settings.grid
assign show_carousel_nav = false
endif
else
assign show_carousel_nav = false
endif
-%}
{%- if section.settings.title != blank or section.settings.link_text != blank or section.settings.enable_carousel == true -%}
{% if section.settings.title != blank %}
## {{ section.settings.title | escape }}
{% endif %}
{% if section.settings.link_text != blank %}
{{ section.settings.link_text | escape }}
{% endif %}
{% endif %}
{%- if show_carousel_nav -%}
{%- endif -%}
{%- assign grid_class = 'one-quarter' -%}
{%- if section.settings.grid == 2 -%}
{%- assign grid_class = 'one-half' -%}
{%- elsif section.settings.grid == 3 -%}
{%- assign grid_class = 'one-third' -%}
{%- elsif section.settings.grid == 5 -%}
{%- assign grid_class = 'one-fifth' -%}
{%- endif -%}
{%- if section.settings.grid_mobile == "2" -%}
{%- assign mobile_grid_class = 'small-down--one-half' -%}
{%- else -%}
{%- assign mobile_grid_class = 'small-down--one-whole' -%}
{%- endif -%}
{% capture grid_class_list %}{{ grid_class }} {{ mobile_grid_class }} grid-flex__item{% endcapture %}
{% for product in section.settings.product_list %}
{% assign quickbuy_toggle = settings.quickbuy_buttons_toggle %}
{% render 'product-block', quickbuy: quickbuy_toggle, product: product, grid_class: grid_class_list, show_vendor: section.settings.show_vendor %}
{%- else -%}
{%- liquid
if section.settings.enable_carousel == true
assign placeholder_count = 8
else
assign placeholder_count = section.settings.grid
endif
-%}
{% for i in (1..placeholder_count) %}
{% capture current %}{% cycle 1, 2, 3, 4, 5, 6 %}{% endcapture %}
{{ 'product-' | append: current | placeholder_svg_tag: 'placeholder-svg placeholder-svg--small' }}
{{ 'homepage.onboarding.product_title' | t }}
{% if product.available %}
{%- if settings.product_currency_code_enabled -%}
{{- 2000 | money_with_currency -}}
{%- else -%}
{{- 2000 | money -}}
{%- endif -%}
{% endif %}
{% endfor %}
{% endfor %}
{%- if show_carousel_nav -%}
{% render 'peek-carousel-advice' %}
{%- endif -%}
{% endif %}
{% schema %}
{
"name": "Product list",
"tag": "section",
"class": "section-product-template-product-list",
"settings": [
{
"type": "text",
"id": "title",
"label": "Heading",
"default": "Product list"
},
{
"type": "checkbox",
"id": "enlarge_title",
"label": "Enlarge heading",
"default": false
},
{
"type": "text",
"id": "link_text",
"label": "Link text",
"default": "Shop now"
},
{
"type": "url",
"id": "link_url",
"label": "Link URL"
},
{
"type": "product_list",
"id": "product_list",
"label": "Product list"
},
{
"type": "checkbox",
"id": "hide_if_empty",
"label": "Hide section if product list is empty",
"info": "Useful when using a dynamic source",
"default": false
},
{
"type": "checkbox",
"id": "show_vendor",
"label": "Show vendor",
"default": false
},
{
"type": "checkbox",
"id": "enable_carousel",
"label": "Enable carousel",
"default": false
},
{
"type": "range",
"id": "grid",
"label": "Desktop products per row",
"min": 2,
"max": 5,
"step": 1,
"default": 4
},
{
"type": "select",
"id": "grid_mobile",
"label": "Mobile products per row",
"options": [
{
"value": "1",
"label": "1"
},
{
"value": "2",
"label": "2"
}
],
"default": "2"
}
],
"presets": [
{
"name": "Product list"
}
],
"enabled_on": {
"templates": [
"product"
]
}
}
{% endschema %}