{% liquid if section.settings.heading != blank assign heading = section.settings.heading else assign heading = 'testimonials.heading' | t endif if section.settings.subheading != blank assign subheading = section.settings.subheading else assign subheading = 'testimonials.subheading' | t endif %}

{{ heading | escape }}

{% if subheading != blank %}

{{ subheading | escape }}

{% endif %}
{% if section.blocks.size > 0 %}
{% for block in section.blocks %}
{% if block.settings.author != blank %}

{{ block.settings.author | escape }}

{% endif %}
{% if block.settings.quote != blank %}

{{ block.settings.quote | escape }}

{% endif %}
{% endfor %}
{% for block in section.blocks %} {% liquid assign slide_product = block.settings.product assign variant = blank assign card_image = blank assign hover_image = blank assign subtitle = blank assign show_compare = false if slide_product != blank assign variant = slide_product.selected_or_first_available_variant assign card_image = slide_product.featured_image for image in slide_product.images offset: 1 limit: 1 assign hover_image = image endfor assign subtitle = slide_product.metafields.custom.subtitulo.value | default: slide_product.metafields.custom.subtitulo if subtitle == blank assign subtitle = slide_product.metafields.custom.subtitle.value | default: slide_product.metafields.custom.subtitle endif if subtitle == blank assign subtitle = slide_product.metafields.custom.presentacion.value | default: slide_product.metafields.custom.presentacion endif if subtitle == blank and variant.title != 'Default Title' assign subtitle = variant.title endif if variant.compare_at_price > variant.price assign show_compare = true endif endif %}
{% if slide_product != blank %}
{{ slide_product.title | escape }} {% if subtitle != blank %}

{{ subtitle | escape }}

{% endif %}

{{ variant.price | money_without_trailing_zeros }} {% if show_compare %} {{ variant.compare_at_price | money_without_trailing_zeros }} {% endif %}

{% endif %}
{% endfor %}
{% endif %}
{% stylesheet %} .testimonials { position: relative; margin-top: 100px; padding-bottom: 100px; overflow: hidden; color: #000; font-family: Archivo, sans-serif; } .testimonials__blob { position: absolute; top: 209px; left: 38px; width: 434px; height: auto; opacity: 0.3; pointer-events: none; user-select: none; } .testimonials__header { position: relative; z-index: 1; padding-inline: 100px; } .testimonials__heading { margin: 0; font-family: "Roc Grotesk", Archivo, sans-serif; font-size: 30px; font-weight: 500; line-height: normal; text-transform: uppercase; } .testimonials__subheading { margin: 10px 0 0; font-size: 20px; font-weight: 300; line-height: 30px; } .testimonials__stage { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 549fr) minmax(220px, 450px); column-gap: clamp(32px, 10vw, 199px); align-items: start; width: min(1198px, calc(100% - 200px)); margin: 100px auto 0; } .testimonials__slide[hidden], .testimonials__product[hidden] { display: none; } .testimonials__meta { display: flex; align-items: center; gap: 20px; } .testimonials__stars { display: flex; gap: 1px; color: #000; } .testimonials__star { display: block; width: 15px; height: 15px; } .testimonials__star svg { display: block; width: 15px; height: 15px; } .testimonials__star.is-off { opacity: 0.25; } .testimonials__author { margin: 0; font-size: 16px; font-weight: 400; line-height: normal; } .testimonials__quote { max-width: 549px; margin: 60px 0 0; font-size: 35px; font-weight: 300; line-height: 45px; } .testimonials__nav { display: flex; gap: 20px; margin-top: 155px; } .testimonials__arrow { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 0; border-radius: 60px; background: #9dd6c7; cursor: pointer; } .testimonials__arrow:disabled { cursor: default; opacity: 0.35; } .testimonials__arrow-icon { display: block; width: 20px; height: 20px; transform: rotate(-90deg); } .testimonials__arrow-icon--next { transform: rotate(90deg); } .testimonials__product { display: flex; flex-direction: column; gap: 10px; } .testimonials__media { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid #eaeaea; border-radius: 10px; background: #fff; } .testimonials__media-link { position: absolute; inset: 0; display: block; } .testimonials__image { display: block; width: 100%; height: 100%; object-fit: contain; } .testimonials__image--hover { position: absolute; inset: 0; object-fit: cover; opacity: 0; transition: opacity 0.35s ease; } .testimonials__media:hover .testimonials__image--hover, .testimonials__media:focus-within .testimonials__image--hover { opacity: 1; } .testimonials__actions { position: absolute; right: 20px; bottom: 10px; left: 20px; z-index: 2; display: flex; gap: 10px; margin: 0; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; } .testimonials__media:hover .testimonials__actions, .testimonials__media:focus-within .testimonials__actions { opacity: 1; pointer-events: auto; } .testimonials__bag, .testimonials__buy { display: flex; align-items: center; justify-content: center; height: 50px; padding: 15px; border: 0; border-radius: 60px; box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); cursor: pointer; } .testimonials__bag { flex: 0 0 50px; width: 50px; background: #000; } .testimonials__bag img { display: block; width: 25px; height: 25px; } .testimonials__buy { flex: 1 1 auto; background: #9dd6c7; color: #000; font-family: Archivo, sans-serif; font-size: 16px; font-weight: 300; line-height: normal; } .testimonials__bag:disabled, .testimonials__buy:disabled { cursor: default; opacity: 0.55; } .testimonials__title { display: block; color: #000; font-size: 18px; font-weight: 700; line-height: normal; text-decoration: none; } .testimonials__subtitle { margin: 5px 0 0; color: #808181; font-size: 14px; font-weight: 300; line-height: normal; } .testimonials__prices { display: flex; align-items: center; margin: 15px 0 0; } .testimonials__price, .testimonials__compare { width: 70px; font-size: 16px; line-height: normal; } .testimonials__price { font-weight: 700; } .testimonials__compare { color: #6e6f6f; font-weight: 400; } .testimonials__arrow:focus-visible, .testimonials__bag:focus-visible, .testimonials__buy:focus-visible, .testimonials__title:focus-visible, .testimonials__media-link:focus-visible { outline: 2px solid #000; outline-offset: 3px; } @media (max-width: 1439px) { .testimonials__header { padding-inline: 40px; } .testimonials__stage { width: min(1198px, calc(100% - 80px)); } .testimonials__blob { left: -40px; width: 280px; } } @media (max-width: 1024px) { .testimonials { margin-top: 50px; padding-bottom: 80px; } .testimonials__blob { top: 80px; left: -30px; width: 180px; } .testimonials__header { padding-inline: 15px; } .testimonials__heading { max-width: 320px; font-size: 22px; line-height: 25px; } .testimonials__subheading { margin-top: 10px; font-size: 14px; line-height: 15px; } .testimonials__stage { display: flex; flex-direction: column; width: min(372px, calc(100% - 30px)); margin-top: 50px; } .testimonials__copy { display: contents; } .testimonials__slide { order: 1; } .testimonials__products { order: 2; margin-top: 25px; } .testimonials__nav { order: 3; justify-content: center; margin-top: 40px; } .testimonials__star, .testimonials__star svg { width: 12px; height: 12px; } .testimonials__author { font-size: 13px; } .testimonials__quote { margin-top: 30px; font-size: 18px; line-height: 25px; } .testimonials__product { flex-direction: row; align-items: center; gap: 10px; width: min(297px, 100%); margin-inline: auto; } .testimonials__media { flex: 0 0 70px; width: 70px; height: 70px; aspect-ratio: auto; } .testimonials__actions { display: none; } .testimonials__title { font-size: 14px; } .testimonials__subtitle { font-size: 12px; } .testimonials__prices { margin-top: 6px; } .testimonials__price, .testimonials__compare { width: auto; margin-right: 10px; font-size: 14px; } } @media (prefers-reduced-motion: reduce) { .testimonials__image--hover, .testimonials__actions { transition: none; } } {% endstylesheet %} {% javascript %} (() => { const setCartCount = (count) => { const link = document.querySelector('.header__cart'); if (!link || count < 1) return; let badge = link.querySelector('[data-cart-count]'); if (!badge) { badge = document.createElement('span'); badge.className = 'absolute right-0 top-0 flex h-4 min-w-4 items-center justify-center rounded-full bg-brand-mint px-[3px] text-[10px] font-medium leading-none text-black'; badge.setAttribute('data-cart-count', ''); link.appendChild(badge); } badge.textContent = String(count); }; const boot = (root) => { if (root.dataset.ready === 'true') return; root.dataset.ready = 'true'; const slides = [...root.querySelectorAll('[data-slide]')]; const products = [...root.querySelectorAll('[data-product]')]; const prev = root.querySelector('[data-prev]'); const next = root.querySelector('[data-next]'); let index = 0; const paint = () => { slides.forEach((slide, slideIndex) => { slide.hidden = slideIndex !== index; }); products.forEach((product, productIndex) => { product.hidden = productIndex !== index; }); if (prev) prev.disabled = index <= 0; if (next) next.disabled = index >= slides.length - 1; }; if (prev) { prev.addEventListener('click', () => { if (index <= 0) return; index -= 1; paint(); }); } if (next) { next.addEventListener('click', () => { if (index >= slides.length - 1) return; index += 1; paint(); }); } paint(); }; const bootAll = (scope) => { scope.querySelectorAll('[data-testimonials]').forEach(boot); }; bootAll(document); document.addEventListener('shopify:section:load', (event) => { bootAll(event.target); }); if (!window.__seasonTestimonials) { window.__seasonTestimonials = true; document.addEventListener('submit', async (event) => { const form = event.target; if (!(form instanceof HTMLFormElement) || !form.classList.contains('testimonials__form')) return; const root = form.closest('[data-testimonials]'); if (!root) return; event.preventDefault(); const button = event.submitter; if (button) button.disabled = true; try { const response = await fetch(root.dataset.cartAddUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, body: JSON.stringify({ id: form.querySelector('[name="id"]').value, quantity: 1, }), }); const data = await response.json(); if (response.ok) { if (button && button.hasAttribute('data-buy') && root.dataset.checkoutUrl) { window.location.href = root.dataset.checkoutUrl; return; } const cart = await fetch('/cart.js').then((result) => result.json()); setCartCount(cart.item_count); } else if (data.description) { window.alert(data.description); } } catch (error) { window.alert(error.message); } finally { if (button) button.disabled = false; } }); } })(); {% endjavascript %} {% schema %} { "name": "t:testimonials.name", "tag": "section", "class": "testimonials-section", "disabled_on": { "groups": ["header", "footer"] }, "settings": [ { "type": "text", "id": "heading", "label": "t:testimonials.heading", "default": "Confianza que se construye con cada rutina" }, { "type": "text", "id": "subheading", "label": "t:testimonials.subheading", "default": "+1,500 pieles ya encontraron su rutina Seasons" } ], "blocks": [ { "type": "review", "name": "t:testimonials.review", "settings": [ { "type": "textarea", "id": "quote", "label": "t:testimonials.quote", "default": "Tengo piel sensible y atópica y es el único bloqueador que me cae bien, la sensación es increíble y he notado que se disminuyen súper rápido las marcas post acné, lo amo, la verdad 😌💕" }, { "type": "text", "id": "author", "label": "t:testimonials.author", "default": "María José" }, { "type": "range", "id": "rating", "label": "t:testimonials.rating_label", "min": 1, "max": 5, "step": 1, "default": 5 }, { "type": "product", "id": "product", "label": "t:testimonials.product" } ] } ], "presets": [ { "name": "t:testimonials.name", "blocks": [ { "type": "review" } ] } ] } {% endschema %}