@houseofviraasi thanks for post yes can you try this code
- Create a New Section for the Carousel
Create a new section file
In the theme code editor, find the Sections directory. Click Add a new section, and name it recommended-products-carousel.liquid.
Paste the following code for the carousel:
{% schema %}
{
"name": "Recommended Products Carousel",
"settings": [
{
"type": "text",
"label": "Section Title",
"id": "section_title",
"default": "Recommended Products"
}
],
"presets": [
{
"name": "Default",
"category": "Custom"
}
]
}
{% endschema %}
{% assign recommended_products = collections['all'].products | limit: 10 %}
3 Style the Carousel
Add this css base.css
.recommended-products-carousel {
padding: 20px;
text-align: center;
}
.carousel-container {
display: flex;
overflow-x: scroll;
gap: 20px;
}
.carousel-item {
min-width: 250px;
max-width: 250px;
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 8px;
text-align: center;
padding: 10px;
}
.carousel-item img {
width: 100%;
height: auto;
border-radius: 8px;
}
.product-info {
margin-top: 10px;
}
.product-info h3 {
font-size: 16px;
margin: 0;
}
.product-info .price {
color: #333;
font-size: 14px;
font-weight: bold;
}
.carousel-container::-webkit-scrollbar {
display: none;
}
- Add the Section to Your Homepage
above footer section
{% section 'recommended-products-carousel' %}