1391 lines
42 KiB
Plaintext
1391 lines
42 KiB
Plaintext
{% liquid
|
||
assign current_variant = product.selected_or_first_available_variant
|
||
assign main_image = current_variant.image | default: product.featured_image
|
||
|
||
assign subtitle = product.metafields.custom.subtitulo.value | default: product.metafields.custom.subtitulo
|
||
if subtitle == blank
|
||
assign subtitle = product.metafields.custom.subtitle.value | default: product.metafields.custom.subtitle
|
||
endif
|
||
if subtitle == blank
|
||
assign subtitle = product.metafields.custom.presentacion.value | default: product.metafields.custom.presentacion
|
||
endif
|
||
if subtitle == blank and current_variant.title != 'Default Title'
|
||
assign subtitle = current_variant.title
|
||
endif
|
||
|
||
assign skin_label = product.metafields.custom.tipo_de_piel.value | default: product.metafields.custom.tipo_de_piel
|
||
if skin_label == blank
|
||
assign skin_label = product.metafields.custom.skin_type.value | default: product.metafields.custom.skin_type
|
||
endif
|
||
|
||
assign badge_best = false
|
||
for tag in product.tags
|
||
assign tag_label = tag | downcase
|
||
if tag_label contains 'vendido' or tag_label contains 'bestseller'
|
||
assign badge_best = true
|
||
endif
|
||
endfor
|
||
|
||
assign excerpt = product.metafields.custom.descripcion_corta.value | default: product.metafields.custom.descripcion_corta
|
||
if excerpt == blank
|
||
assign excerpt = product.metafields.custom.short_description.value | default: product.metafields.custom.excerpt.value
|
||
endif
|
||
if excerpt == blank
|
||
assign excerpt = product.description | strip_html | truncate: 180
|
||
endif
|
||
|
||
assign how_field = product.metafields.custom.como_aplicarlo
|
||
if how_field == blank
|
||
assign how_field = product.metafields.custom.how_to
|
||
endif
|
||
if how_field == blank
|
||
assign how_field = product.metafields.custom.modo_de_uso
|
||
endif
|
||
|
||
assign ingredients_field = product.metafields.custom.ingredientes
|
||
if ingredients_field == blank
|
||
assign ingredients_field = product.metafields.custom.ingredients
|
||
endif
|
||
|
||
assign payments_field = product.metafields.custom.metodos_de_pago
|
||
if payments_field == blank
|
||
assign payments_field = product.metafields.custom.payment_methods
|
||
endif
|
||
|
||
assign before_source = product.metafields.custom.antes.value | default: product.metafields.custom.before.value | default: product.metafields.custom.imagen_antes.value
|
||
assign after_source = product.metafields.custom.despues.value | default: product.metafields.custom.after.value | default: product.metafields.custom.imagen_despues.value
|
||
assign compare_pair = product.metafields.custom.antes_despues.value | default: product.metafields.custom.before_after.value
|
||
if before_source == blank and compare_pair != blank
|
||
assign before_source = compare_pair.first
|
||
assign after_source = compare_pair.last
|
||
endif
|
||
|
||
assign before_image = blank
|
||
if before_source.preview_image != blank
|
||
assign before_image = before_source.preview_image
|
||
elsif before_source.width != blank
|
||
assign before_image = before_source
|
||
endif
|
||
|
||
assign after_image = blank
|
||
if after_source.preview_image != blank
|
||
assign after_image = after_source.preview_image
|
||
elsif after_source.width != blank
|
||
assign after_image = after_source
|
||
endif
|
||
|
||
assign show_compare = false
|
||
if before_image != blank and after_image != blank
|
||
assign show_compare = true
|
||
endif
|
||
assign before_alt = 'product_page.before' | t
|
||
assign after_alt = 'product_page.after' | t
|
||
|
||
assign show_sale = false
|
||
if current_variant.compare_at_price > current_variant.price
|
||
assign show_sale = true
|
||
endif
|
||
|
||
assign rating_value = 0
|
||
assign rating_count = 0
|
||
if product.metafields.reviews.rating.value != blank
|
||
assign rating_value = product.metafields.reviews.rating.value.rating | round
|
||
endif
|
||
if product.metafields.reviews.rating_count.value != blank
|
||
assign rating_count = product.metafields.reviews.rating_count.value | plus: 0
|
||
endif
|
||
|
||
assign routine_products = product.metafields.custom.rutina.value | default: product.metafields.custom.completa_tu_rutina.value | default: product.metafields.custom.routine.value
|
||
assign also_products = product.metafields.custom.llevate.value | default: product.metafields.custom.llevate_tambien.value | default: product.metafields.custom.tambien.value
|
||
|
||
assign review_items = product.metafields.custom.resenas.value | default: product.metafields.custom.reviews.value
|
||
assign review_count = 0
|
||
if review_items != blank
|
||
assign review_count = review_items.size
|
||
endif
|
||
|
||
assign routine_count = 0
|
||
assign routine_ids = '|'
|
||
if routine_products != blank
|
||
for item in routine_products
|
||
if item.id != blank and item.id != product.id
|
||
assign routine_count = routine_count | plus: 1
|
||
assign routine_ids = routine_ids | append: item.id | append: '|'
|
||
endif
|
||
endfor
|
||
endif
|
||
|
||
assign also_count = 0
|
||
if also_products != blank
|
||
for item in also_products
|
||
assign item_token = '|' | append: item.id | append: '|'
|
||
if item.id != blank and item.id != product.id
|
||
unless routine_ids contains item_token
|
||
assign also_count = also_count | plus: 1
|
||
endunless
|
||
endif
|
||
endfor
|
||
endif
|
||
|
||
assign show_reviews = false
|
||
if rating_count > 0 or review_count > 0
|
||
assign show_reviews = true
|
||
endif
|
||
|
||
assign review_pages = review_count | plus: 2 | divided_by: 3
|
||
assign main_alt = main_image.alt | default: product.title
|
||
%}
|
||
|
||
<article
|
||
class="product full-width"
|
||
data-product-page
|
||
data-product-view
|
||
data-product-handle="{{ product.handle | escape }}"
|
||
data-product-id="{{ product.id }}"
|
||
data-root="{{ routes.root_url }}"
|
||
>
|
||
<div class="product__hero">
|
||
<div class="product__gallery">
|
||
<div class="product__main">
|
||
{% if main_image %}
|
||
{{
|
||
main_image
|
||
| image_url: width: 1400
|
||
| image_tag:
|
||
class: 'product__main-image',
|
||
alt: main_alt,
|
||
loading: 'eager',
|
||
fetchpriority: 'high',
|
||
widths: '700, 1000, 1400',
|
||
sizes: '(min-width: 1120px) 58vw, 100vw',
|
||
data-main-image: 'true'
|
||
}}
|
||
{% else %}
|
||
{{ 'product-1' | placeholder_svg_tag: 'product__main-image' }}
|
||
{% endif %}
|
||
</div>
|
||
{% if product.images.size > 1 %}
|
||
<div class="product__thumbs">
|
||
{% for image in product.images %}
|
||
{% if image.id != main_image.id %}
|
||
{% assign thumb_alt = image.alt | default: product.title %}
|
||
{{
|
||
image
|
||
| image_url: width: 900
|
||
| image_tag:
|
||
alt: thumb_alt,
|
||
loading: 'lazy',
|
||
widths: '400, 700, 900',
|
||
sizes: '(min-width: 1120px) 28vw, 50vw'
|
||
}}
|
||
{% endif %}
|
||
{% endfor %}
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
|
||
<div class="product__details">
|
||
{% if badge_best or skin_label != blank %}
|
||
<div class="product__badges">
|
||
{% if badge_best %}
|
||
<span class="product__badge product__badge--best">{{ 'bestsellers.badge' | t }}</span>
|
||
{% endif %}
|
||
{% if skin_label != blank %}
|
||
<span class="product__badge product__badge--skin">{{ skin_label | escape }}</span>
|
||
{% endif %}
|
||
</div>
|
||
{% endif %}
|
||
|
||
<h1 class="product__title">{{ product.title | escape }}</h1>
|
||
{% if subtitle != blank %}
|
||
<p class="product__subtitle">{{ subtitle | escape }}</p>
|
||
{% endif %}
|
||
|
||
{% if rating_count > 0 %}
|
||
<div class="product__rating">
|
||
<span class="product__stars" aria-hidden="true">
|
||
{% for star in (1..5) %}
|
||
<svg class="product__star{% if star > rating_value %} is-off{% endif %}" width="16" height="16" viewBox="0 0 14 14" focusable="false">
|
||
<path d="M7 1.2l1.45 3.22 3.5.4-2.62 2.38.74 3.46L7 8.95 3.93 10.66l.74-3.46L2.05 4.82l3.5-.4L7 1.2z" fill="currentColor"/>
|
||
</svg>
|
||
{% endfor %}
|
||
</span>
|
||
<p class="product__reviews-count">{{ 'bestsellers.reviews' | t: count: rating_count }}</p>
|
||
</div>
|
||
{% endif %}
|
||
|
||
<p class="product__price">
|
||
<span data-price>{{ current_variant.price | money_without_trailing_zeros }}</span>
|
||
<s data-compare {% unless show_sale %}hidden{% endunless %}>
|
||
{% if show_sale %}{{ current_variant.compare_at_price | money_without_trailing_zeros }}{% endif %}
|
||
</s>
|
||
</p>
|
||
|
||
{% if excerpt != blank %}
|
||
<p class="product__excerpt">{{ excerpt | escape }}</p>
|
||
{% endif %}
|
||
|
||
{% form 'product', product, class: 'product__form' %}
|
||
<input type="hidden" name="id" value="{{ current_variant.id }}">
|
||
|
||
{% unless product.has_only_default_variant %}
|
||
<p
|
||
class="product__options-label"
|
||
data-option-template="{{ 'product_page.options' | t: option: '__OPTION__' | escape }}"
|
||
>
|
||
{{ 'product_page.options' | t: option: current_variant.title }}
|
||
</p>
|
||
<div class="product__swatches">
|
||
{% for variant in product.variants %}
|
||
{% liquid
|
||
assign variant_image = variant.image
|
||
if variant_image == blank and variant.featured_media
|
||
assign variant_image = variant.featured_media.preview_image
|
||
endif
|
||
if variant_image == blank
|
||
assign variant_image = product.featured_image
|
||
endif
|
||
assign variant_sale = false
|
||
if variant.compare_at_price > variant.price
|
||
assign variant_sale = true
|
||
endif
|
||
%}
|
||
<button
|
||
class="product__swatch{% if variant.id == current_variant.id %} is-selected{% endif %}"
|
||
type="button"
|
||
data-variant
|
||
data-id="{{ variant.id }}"
|
||
data-title="{{ variant.title | escape }}"
|
||
data-available="{{ variant.available }}"
|
||
data-price="{{ variant.price | money_without_trailing_zeros | escape }}"
|
||
{% if variant_sale %}
|
||
data-compare="{{ variant.compare_at_price | money_without_trailing_zeros | escape }}"
|
||
{% endif %}
|
||
{% if variant_image %}
|
||
data-image="{{ variant_image | image_url: width: 1400 }}"
|
||
{% endif %}
|
||
>
|
||
{% if variant_image %}
|
||
{{ variant_image | image_url: width: 240 | image_tag: alt: variant.title, loading: 'lazy' }}
|
||
{% endif %}
|
||
<span>{{ variant.title | escape }}</span>
|
||
</button>
|
||
{% endfor %}
|
||
</div>
|
||
{% endunless %}
|
||
|
||
<ul class="product__trust">
|
||
<li class="product__trust-row">
|
||
<span class="product__trust-icon">{{ 'icon-marquee-shipping.svg' | inline_asset_content }}</span>
|
||
<span>{{ 'product_page.shipping' | t }}</span>
|
||
</li>
|
||
<li class="product__trust-row">
|
||
<span class="product__trust-icon">{{ 'icon-marquee-card.svg' | inline_asset_content }}</span>
|
||
<span>{{ 'product_page.payment' | t }}</span>
|
||
</li>
|
||
<li class="product__trust-row">
|
||
<span class="product__trust-icon">{{ 'icon-marquee-wallet.svg' | inline_asset_content }}</span>
|
||
<span>{{ 'product_page.installments' | t }}</span>
|
||
</li>
|
||
<li class="product__trust-row">
|
||
<span class="product__trust-icon">{{ 'icon-marquee-guarantee.svg' | inline_asset_content }}</span>
|
||
<span>{{ 'product_page.guarantee' | t }}</span>
|
||
</li>
|
||
</ul>
|
||
|
||
<div class="product__purchase">
|
||
<div class="product__qty">
|
||
<button type="button" data-qty="down" aria-label="{{ 'product_page.decrease' | t }}">−</button>
|
||
<input type="number" name="quantity" value="1" min="1" inputmode="numeric" data-qty-input aria-label="{{ 'product_page.increase' | t }}">
|
||
<button type="button" data-qty="up" aria-label="{{ 'product_page.increase' | t }}">+</button>
|
||
</div>
|
||
<button
|
||
class="product__add"
|
||
type="submit"
|
||
data-add
|
||
data-label="{{ 'product_page.add' | t | escape }}"
|
||
data-sold-out="{{ 'bestsellers.sold_out' | t | escape }}"
|
||
{% unless current_variant.available %}disabled{% endunless %}
|
||
>
|
||
{% if current_variant.available %}
|
||
{{ 'product_page.add' | t }}
|
||
{% else %}
|
||
{{ 'bestsellers.sold_out' | t }}
|
||
{% endif %}
|
||
</button>
|
||
</div>
|
||
<button class="product__buy" type="submit" data-buy {% unless current_variant.available %}disabled{% endunless %}>
|
||
{{ 'product_page.buy' | t }}
|
||
</button>
|
||
{% endform %}
|
||
|
||
<button
|
||
class="product__favorite"
|
||
type="button"
|
||
data-product-wish
|
||
data-product-id="{{ product.id }}"
|
||
aria-pressed="false"
|
||
aria-label="{{ 'bestsellers.save' | t: product: product.title }}"
|
||
data-label-save="{{ 'bestsellers.save' | t: product: product.title }}"
|
||
data-label-saved="{{ 'bestsellers.saved' | t: product: product.title }}"
|
||
>
|
||
<svg width="22" height="22" viewBox="0 0 25 25" aria-hidden="true" focusable="false">
|
||
<path d="M17.2324 3.90625C14.0625 3.90625 12.5 7.03125 12.5 7.03125C12.5 7.03125 10.9375 3.90625 7.76758 3.90625C5.19141 3.90625 3.15137 6.06152 3.125 8.6333C3.07129 13.9717 7.35986 17.7681 12.0605 20.9585C12.1901 21.0467 12.3433 21.0938 12.5 21.0938C12.6567 21.0938 12.8099 21.0467 12.9395 20.9585C17.6396 17.7681 21.9282 13.9717 21.875 8.6333C21.8486 6.06152 19.8086 3.90625 17.2324 3.90625Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||
</svg>
|
||
<span>{{ 'product_page.favorite' | t }}</span>
|
||
</button>
|
||
|
||
<div class="product__accordions">
|
||
{% if product.description != blank %}
|
||
<details class="product__accordion">
|
||
<summary>
|
||
<span>{{ 'product_page.description' | t }}</span>
|
||
<svg class="product__chevron" width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
||
<path d="M2.5 5l4.5 4.5L11.5 5" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||
</svg>
|
||
</summary>
|
||
<div class="product__accordion-body">{{ product.description }}</div>
|
||
</details>
|
||
{% endif %}
|
||
{% if how_field != blank %}
|
||
<details class="product__accordion">
|
||
<summary>
|
||
<span>{{ 'product_page.how_to' | t }}</span>
|
||
<svg class="product__chevron" width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
||
<path d="M2.5 5l4.5 4.5L11.5 5" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||
</svg>
|
||
</summary>
|
||
<div class="product__accordion-body">{{ how_field | metafield_tag }}</div>
|
||
</details>
|
||
{% endif %}
|
||
{% if ingredients_field != blank %}
|
||
<details class="product__accordion">
|
||
<summary>
|
||
<span>{{ 'product_page.ingredients' | t }}</span>
|
||
<svg class="product__chevron" width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
||
<path d="M2.5 5l4.5 4.5L11.5 5" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||
</svg>
|
||
</summary>
|
||
<div class="product__accordion-body">{{ ingredients_field | metafield_tag }}</div>
|
||
</details>
|
||
{% endif %}
|
||
<details class="product__accordion">
|
||
<summary>
|
||
<span>{{ 'product_page.payments' | t }}</span>
|
||
<svg class="product__chevron" width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
||
<path d="M2.5 5l4.5 4.5L11.5 5" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||
</svg>
|
||
</summary>
|
||
<div class="product__accordion-body">
|
||
{% if payments_field != blank %}
|
||
{{ payments_field | metafield_tag }}
|
||
{% else %}
|
||
<p>{{ 'product_page.payments_text' | t }}</p>
|
||
{% endif %}
|
||
</div>
|
||
</details>
|
||
</div>
|
||
|
||
<section
|
||
class="product__routine"
|
||
data-product-block
|
||
data-recs="complementary"
|
||
data-limit="2"
|
||
{% if routine_count == 0 %}hidden{% else %}data-filled="true"{% endif %}
|
||
>
|
||
<h2 class="product__routine-title">{{ 'product_page.routine' | t }}</h2>
|
||
<div class="product__routine-grid" data-recs-list>
|
||
{% if routine_products != blank %}
|
||
{% assign routine_shown = 0 %}
|
||
{% for item in routine_products %}
|
||
{% if routine_shown < 2 and item.id != blank and item.id != product.id %}
|
||
{% assign routine_key = 'routine-' | append: item.id %}
|
||
{% render 'collection-card', product: item, form_suffix: routine_key %}
|
||
{% assign routine_shown = routine_shown | plus: 1 %}
|
||
{% endif %}
|
||
{% endfor %}
|
||
{% endif %}
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</div>
|
||
|
||
{% if show_compare %}
|
||
<section class="product__compare" aria-label="{{ 'product_page.before' | t }} / {{ 'product_page.after' | t }}">
|
||
<div class="product__compare-pane">
|
||
{{
|
||
before_image
|
||
| image_url: width: 1400
|
||
| image_tag: alt: before_alt, loading: 'lazy', widths: '600, 1000, 1400', sizes: '(min-width: 1120px) 45vw, 50vw'
|
||
}}
|
||
<span class="product__compare-label">{{ 'product_page.before' | t }}</span>
|
||
</div>
|
||
<div class="product__compare-pane">
|
||
{{
|
||
after_image
|
||
| image_url: width: 1400
|
||
| image_tag: alt: after_alt, loading: 'lazy', widths: '600, 1000, 1400', sizes: '(min-width: 1120px) 45vw, 50vw'
|
||
}}
|
||
<span class="product__compare-label product__compare-label--after">{{ 'product_page.after' | t }}</span>
|
||
</div>
|
||
<img class="product__compare-mark" src="{{ 'logo-seasons.svg' | asset_url }}" alt="" width="280" height="80">
|
||
</section>
|
||
{% endif %}
|
||
|
||
<section
|
||
class="product__also"
|
||
data-product-block
|
||
data-recs="related"
|
||
data-limit="4"
|
||
{% if also_count == 0 %}hidden{% else %}data-filled="true"{% endif %}
|
||
>
|
||
<h2 class="product__block-title">{{ 'product_page.also' | t }}</h2>
|
||
<div class="product__also-grid" data-recs-list>
|
||
{% if also_products != blank %}
|
||
{% assign also_shown = 0 %}
|
||
{% for item in also_products %}
|
||
{% assign item_token = '|' | append: item.id | append: '|' %}
|
||
{% if also_shown < 4 and item.id != blank and item.id != product.id %}
|
||
{% unless routine_ids contains item_token %}
|
||
{% assign also_key = 'also-' | append: item.id %}
|
||
{% render 'collection-card', product: item, form_suffix: also_key %}
|
||
{% assign also_shown = also_shown | plus: 1 %}
|
||
{% endunless %}
|
||
{% endif %}
|
||
{% endfor %}
|
||
{% endif %}
|
||
</div>
|
||
</section>
|
||
|
||
{% if show_reviews %}
|
||
<section class="product__reviews" id="product-reviews">
|
||
<h2 class="product__block-title">{{ 'product_page.reviews' | t }}</h2>
|
||
{% if rating_count > 0 %}
|
||
<div class="product__summary">
|
||
<div>
|
||
<p class="product__score">{{ 'product_page.rating_of' | t: rating: rating_value }}</p>
|
||
<p class="product__based">{{ 'product_page.based_on' | t: count: rating_count }}</p>
|
||
</div>
|
||
<span class="product__stars" aria-hidden="true">
|
||
{% for star in (1..5) %}
|
||
<svg class="product__star{% if star > rating_value %} is-off{% endif %}" width="18" height="18" viewBox="0 0 14 14" focusable="false">
|
||
<path d="M7 1.2l1.45 3.22 3.5.4-2.62 2.38.74 3.46L7 8.95 3.93 10.66l.74-3.46L2.05 4.82l3.5-.4L7 1.2z" fill="currentColor"/>
|
||
</svg>
|
||
{% endfor %}
|
||
</span>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if review_items != blank %}
|
||
<div data-review-list>
|
||
{% for review in review_items %}
|
||
{% liquid
|
||
assign review_field = review.texto | default: review.text | default: review.comentario | default: review.resena
|
||
assign review_author = review.autor.value | default: review.autor | default: review.author.value | default: review.nombre.value | default: review.name.value
|
||
assign review_stars = review.calificacion.value | default: review.rating.value | default: 5 | round
|
||
assign review_photo = review.foto.value | default: review.image.value | default: review.avatar.value
|
||
assign review_image = blank
|
||
if review_photo.preview_image != blank
|
||
assign review_image = review_photo.preview_image
|
||
elsif review_photo.width != blank
|
||
assign review_image = review_photo
|
||
endif
|
||
if review_author == blank
|
||
assign review_author = 'product_page.reviewer' | t
|
||
endif
|
||
assign review_initial = review_author | slice: 0, 1 | upcase
|
||
assign review_plain = ''
|
||
if review.id == blank
|
||
assign review_plain = review | strip
|
||
endif
|
||
%}
|
||
{% if review_field != blank or review_plain != blank %}
|
||
<article class="product__review" data-review {% if forloop.index > 3 %}hidden{% endif %}>
|
||
{% if review_image %}
|
||
{{ review_image | image_url: width: 120 | image_tag: class: 'product__avatar', alt: review_author, loading: 'lazy' }}
|
||
{% else %}
|
||
<span class="product__avatar" aria-hidden="true">{{ review_initial | escape }}</span>
|
||
{% endif %}
|
||
<div>
|
||
<p class="product__review-name">{{ review_author | escape }}</p>
|
||
<span class="product__stars" aria-hidden="true">
|
||
{% for star in (1..5) %}
|
||
<svg class="product__star{% if star > review_stars %} is-off{% endif %}" width="14" height="14" viewBox="0 0 14 14" focusable="false">
|
||
<path d="M7 1.2l1.45 3.22 3.5.4-2.62 2.38.74 3.46L7 8.95 3.93 10.66l.74-3.46L2.05 4.82l3.5-.4L7 1.2z" fill="currentColor"/>
|
||
</svg>
|
||
{% endfor %}
|
||
</span>
|
||
<div class="product__review-text">
|
||
{% if review_field != blank %}
|
||
{{ review_field | metafield_tag }}
|
||
{% else %}
|
||
{{ review_plain | escape | newline_to_br }}
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
</article>
|
||
{% endif %}
|
||
{% endfor %}
|
||
</div>
|
||
{% if review_count > 3 %}
|
||
<nav class="product__pager" data-review-pager aria-label="{{ 'product_page.reviews_label' | t }}">
|
||
{% for page_number in (1..review_pages) %}
|
||
<button type="button" data-review-page="{{ forloop.index0 }}" {% if forloop.first %}class="is-current"{% endif %} aria-label="{{ 'collection_page.page' | t: page: forloop.index }}">
|
||
{{ forloop.index }}
|
||
</button>
|
||
{% endfor %}
|
||
<button type="button" data-review-next aria-label="{{ 'collection_page.next_page' | t }}">
|
||
<svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
||
<path d="M5 2.5l4.5 4.5L5 11.5" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||
</svg>
|
||
</button>
|
||
</nav>
|
||
{% endif %}
|
||
{% endif %}
|
||
</section>
|
||
{% endif %}
|
||
</article>
|
||
|
||
{% stylesheet %}
|
||
.product {
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
padding: 24px 50px 88px;
|
||
background: #fff;
|
||
color: #111;
|
||
font-family: inherit;
|
||
}
|
||
|
||
.product__hero {
|
||
display: grid;
|
||
grid-template-columns: minmax(0, 1.6fr) minmax(340px, 640px);
|
||
align-items: start;
|
||
gap: 10px;
|
||
}
|
||
|
||
.product__details {
|
||
position: sticky;
|
||
top: 24px;
|
||
align-self: start;
|
||
min-width: 0;
|
||
padding: 8px 10px 0 36px;
|
||
}
|
||
|
||
.product__gallery {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 10px;
|
||
min-width: 0;
|
||
}
|
||
|
||
.product__main-image,
|
||
.product__thumbs img {
|
||
display: block;
|
||
width: 100%;
|
||
height: auto;
|
||
aspect-ratio: 1;
|
||
object-fit: cover;
|
||
background: #f4f4f4;
|
||
}
|
||
|
||
.product__thumbs {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
gap: 10px;
|
||
}
|
||
|
||
.product__badges {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 8px;
|
||
margin: 0 0 12px;
|
||
}
|
||
|
||
.product__badge {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
height: 22px;
|
||
padding: 0 8px;
|
||
border-radius: 4px;
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
line-height: 1;
|
||
}
|
||
|
||
.product__badge--best {
|
||
background: #bfffb2;
|
||
}
|
||
|
||
.product__badge--skin {
|
||
background: #f7c585;
|
||
}
|
||
|
||
.product__title {
|
||
margin: 0;
|
||
font-size: 32px;
|
||
line-height: 1.1;
|
||
font-weight: 700;
|
||
}
|
||
|
||
.product__subtitle {
|
||
margin: 6px 0 0;
|
||
color: #808181;
|
||
font-size: 16px;
|
||
font-weight: 300;
|
||
}
|
||
|
||
.product__rating,
|
||
.product__summary {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
.product__rating {
|
||
margin-top: 10px;
|
||
}
|
||
|
||
.product__reviews-count,
|
||
.product__based {
|
||
margin: 0;
|
||
color: #808181;
|
||
font-size: 14px;
|
||
font-weight: 300;
|
||
}
|
||
|
||
.product__stars {
|
||
display: inline-flex;
|
||
gap: 2px;
|
||
color: #111;
|
||
}
|
||
|
||
.product__star.is-off {
|
||
color: #d5d5d5;
|
||
}
|
||
|
||
.product__price {
|
||
display: flex;
|
||
align-items: baseline;
|
||
gap: 10px;
|
||
margin: 12px 0 0;
|
||
font-size: 24px;
|
||
font-weight: 700;
|
||
}
|
||
|
||
.product__price s {
|
||
color: #808181;
|
||
font-size: 18px;
|
||
font-weight: 400;
|
||
}
|
||
|
||
.product__excerpt {
|
||
margin: 12px 0 0;
|
||
font-size: 16px;
|
||
font-weight: 300;
|
||
line-height: 1.45;
|
||
}
|
||
|
||
.product__options-label {
|
||
margin: 18px 0 0;
|
||
font-size: 16px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.product__swatches {
|
||
display: flex;
|
||
gap: 12px;
|
||
margin-top: 10px;
|
||
overflow-x: auto;
|
||
}
|
||
|
||
.product__swatch {
|
||
width: 140px;
|
||
flex: none;
|
||
padding: 10px 10px 12px;
|
||
border: 1px solid #e6e6e6;
|
||
border-radius: 10px;
|
||
background: #fff;
|
||
text-align: center;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.product__swatch.is-selected {
|
||
border-color: #111;
|
||
}
|
||
|
||
.product__swatch img {
|
||
display: block;
|
||
width: 120px;
|
||
height: 120px;
|
||
margin: 0 auto 8px;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.product__swatch span {
|
||
display: block;
|
||
font-size: 14px;
|
||
font-weight: 400;
|
||
}
|
||
|
||
.product__trust {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 15px;
|
||
margin: 18px 0;
|
||
padding: 15px 20px;
|
||
border: 1px solid #ececec;
|
||
border-radius: 12px;
|
||
list-style: none;
|
||
}
|
||
|
||
.product__trust-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
font-size: 15px;
|
||
font-weight: 300;
|
||
line-height: 20px;
|
||
}
|
||
|
||
.product__trust-icon {
|
||
display: flex;
|
||
flex: none;
|
||
width: 20px;
|
||
height: 20px;
|
||
}
|
||
|
||
.product__trust-icon svg {
|
||
width: 20px;
|
||
height: 20px;
|
||
}
|
||
|
||
.product__purchase {
|
||
display: flex;
|
||
gap: 12px;
|
||
}
|
||
|
||
.product__qty {
|
||
display: flex;
|
||
flex: none;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
width: 160px;
|
||
height: 50px;
|
||
padding: 0 14px;
|
||
border: 1px solid #111;
|
||
border-radius: 60px;
|
||
}
|
||
|
||
.product__qty button,
|
||
.product__add,
|
||
.product__buy,
|
||
.product__favorite,
|
||
.product__pager button {
|
||
font-family: inherit;
|
||
}
|
||
|
||
.product__qty button {
|
||
width: 28px;
|
||
height: 28px;
|
||
border: 0;
|
||
background: transparent;
|
||
font-size: 20px;
|
||
line-height: 1;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.product__qty input {
|
||
width: 42px;
|
||
border: 0;
|
||
background: transparent;
|
||
text-align: center;
|
||
font-size: 16px;
|
||
-moz-appearance: textfield;
|
||
}
|
||
|
||
.product__qty input::-webkit-outer-spin-button,
|
||
.product__qty input::-webkit-inner-spin-button {
|
||
margin: 0;
|
||
-webkit-appearance: none;
|
||
}
|
||
|
||
.product__add,
|
||
.product__buy {
|
||
height: 50px;
|
||
border-radius: 60px;
|
||
font-size: 16px;
|
||
font-weight: 300;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.product__add {
|
||
flex: 1;
|
||
border: 0;
|
||
background: #111;
|
||
color: #fff;
|
||
}
|
||
|
||
.product__buy {
|
||
width: 100%;
|
||
margin-top: 10px;
|
||
border: 1px solid #111;
|
||
background: #fff;
|
||
color: #111;
|
||
}
|
||
|
||
.product__add:disabled,
|
||
.product__buy:disabled {
|
||
cursor: not-allowed;
|
||
opacity: 0.45;
|
||
}
|
||
|
||
.product__favorite {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 8px;
|
||
width: 100%;
|
||
height: 50px;
|
||
margin-top: 4px;
|
||
border: 0;
|
||
background: transparent;
|
||
font-size: 16px;
|
||
font-weight: 300;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.product__favorite.is-active svg path {
|
||
fill: currentColor;
|
||
}
|
||
|
||
.product__accordions {
|
||
margin-top: 8px;
|
||
border-top: 1px solid #ececec;
|
||
}
|
||
|
||
.product__accordion {
|
||
border-bottom: 1px solid #ececec;
|
||
}
|
||
|
||
.product__accordion summary {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 12px;
|
||
min-height: 52px;
|
||
font-size: 16px;
|
||
font-weight: 300;
|
||
list-style: none;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.product__accordion summary::-webkit-details-marker {
|
||
display: none;
|
||
}
|
||
|
||
.product__chevron {
|
||
flex: none;
|
||
transition: transform 0.2s ease;
|
||
}
|
||
|
||
.product__accordion[open] .product__chevron {
|
||
transform: rotate(180deg);
|
||
}
|
||
|
||
.product__accordion-body {
|
||
padding: 0 0 16px;
|
||
color: #333;
|
||
font-size: 15px;
|
||
font-weight: 300;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.product__accordion-body img {
|
||
max-width: 100%;
|
||
height: auto;
|
||
}
|
||
|
||
.product__routine {
|
||
margin-top: 28px;
|
||
}
|
||
|
||
.product__routine-title,
|
||
.product__block-title {
|
||
margin: 0 0 16px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.product__routine-title {
|
||
font-size: 16px;
|
||
}
|
||
|
||
.product__block-title {
|
||
margin-bottom: 24px;
|
||
font-size: 32px;
|
||
}
|
||
|
||
.product__routine-grid,
|
||
.product__also-grid {
|
||
display: grid;
|
||
gap: 20px;
|
||
}
|
||
|
||
.product__routine-grid {
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
}
|
||
|
||
.product__also-grid {
|
||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||
}
|
||
|
||
.product__routine .collection-card__title {
|
||
font-size: 15px;
|
||
}
|
||
|
||
.product__routine .collection-card__subtitle,
|
||
.product__routine .collection-card__reviews {
|
||
font-size: 12px;
|
||
}
|
||
|
||
.product__compare {
|
||
display: flex;
|
||
height: 550px;
|
||
margin-top: 56px;
|
||
overflow: hidden;
|
||
border-radius: 16px;
|
||
position: relative;
|
||
}
|
||
|
||
.product__compare-pane {
|
||
position: relative;
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.product__compare-pane img {
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.product__compare-label {
|
||
position: absolute;
|
||
top: 24px;
|
||
left: 24px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
height: 44px;
|
||
padding: 0 22px;
|
||
border-radius: 999px;
|
||
background: #fff;
|
||
font-size: 16px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.product__compare-label--after {
|
||
right: 24px;
|
||
left: auto;
|
||
}
|
||
|
||
.product__compare-mark {
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
width: min(280px, 28%);
|
||
height: auto;
|
||
transform: translate(-50%, -50%);
|
||
filter: brightness(0) invert(1);
|
||
pointer-events: none;
|
||
}
|
||
|
||
.product__also,
|
||
.product__reviews {
|
||
margin-top: 72px;
|
||
}
|
||
|
||
.product__score {
|
||
margin: 0;
|
||
font-size: 28px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.product__summary {
|
||
justify-content: space-between;
|
||
align-items: flex-end;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.product__review {
|
||
display: grid;
|
||
grid-template-columns: 56px minmax(0, 1fr);
|
||
gap: 16px;
|
||
padding: 20px 0;
|
||
border-top: 1px solid #ececec;
|
||
}
|
||
|
||
.product__avatar {
|
||
display: grid;
|
||
width: 56px;
|
||
height: 56px;
|
||
place-items: center;
|
||
overflow: hidden;
|
||
border-radius: 50%;
|
||
background: #f3f3f3;
|
||
font-weight: 600;
|
||
}
|
||
|
||
img.product__avatar {
|
||
display: block;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.product__review-name {
|
||
margin: 0 0 6px;
|
||
font-size: 16px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.product__review-text {
|
||
margin-top: 8px;
|
||
font-size: 15px;
|
||
font-weight: 300;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.product__pager {
|
||
display: flex;
|
||
justify-content: center;
|
||
gap: 8px;
|
||
margin-top: 28px;
|
||
}
|
||
|
||
.product__pager button {
|
||
display: grid;
|
||
width: 40px;
|
||
height: 40px;
|
||
place-items: center;
|
||
border: 0;
|
||
border-radius: 50%;
|
||
background: transparent;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.product__pager button.is-current {
|
||
background: #111;
|
||
color: #fff;
|
||
}
|
||
|
||
.product__pager [data-review-next] {
|
||
background: #c9c9c9;
|
||
}
|
||
|
||
.product [hidden] {
|
||
display: none !important;
|
||
}
|
||
|
||
@media (max-width: 1119px) {
|
||
.product {
|
||
padding: 16px 20px 64px;
|
||
}
|
||
|
||
.product__hero {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.product__details {
|
||
position: static;
|
||
padding: 24px 0 0;
|
||
}
|
||
|
||
.product__also-grid {
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
}
|
||
|
||
.product__compare {
|
||
height: 360px;
|
||
}
|
||
}
|
||
|
||
@media (max-width: 767px) {
|
||
.product {
|
||
padding: 12px 16px 56px;
|
||
}
|
||
|
||
.product__title {
|
||
font-size: 26px;
|
||
}
|
||
|
||
.product__block-title {
|
||
font-size: 24px;
|
||
}
|
||
|
||
.product__compare {
|
||
height: 240px;
|
||
margin-top: 32px;
|
||
border-radius: 12px;
|
||
}
|
||
|
||
.product__compare-label {
|
||
top: 12px;
|
||
left: 12px;
|
||
height: 34px;
|
||
padding: 0 14px;
|
||
font-size: 13px;
|
||
}
|
||
|
||
.product__compare-label--after {
|
||
right: 12px;
|
||
}
|
||
|
||
.product__compare-mark {
|
||
display: none;
|
||
}
|
||
|
||
.product__also,
|
||
.product__reviews {
|
||
margin-top: 40px;
|
||
}
|
||
|
||
.product__summary {
|
||
align-items: flex-start;
|
||
flex-direction: column;
|
||
}
|
||
}
|
||
{% endstylesheet %}
|
||
|
||
{% javascript %}
|
||
(() => {
|
||
if (window.__seasonProduct) return;
|
||
window.__seasonProduct = true;
|
||
|
||
const wishlistKey = 'seasons-wishlist';
|
||
|
||
const readList = (key) => {
|
||
try {
|
||
const stored = JSON.parse(window.localStorage.getItem(key));
|
||
return Array.isArray(stored) ? stored.map(String) : [];
|
||
} catch (error) {
|
||
return [];
|
||
}
|
||
};
|
||
|
||
const root = document.querySelector('[data-product-page]');
|
||
if (!root) return;
|
||
|
||
const handle = root.dataset.productHandle;
|
||
if (handle) {
|
||
const handles = [handle].concat(readList('seasons-recent').filter((item) => item !== handle)).slice(0, 8);
|
||
window.localStorage.setItem('seasons-recent', JSON.stringify(handles));
|
||
}
|
||
|
||
const applyWish = () => {
|
||
const saved = readList(wishlistKey);
|
||
root.querySelectorAll('[data-product-wish]').forEach((button) => {
|
||
const active = saved.includes(String(button.dataset.productId));
|
||
button.classList.toggle('is-active', active);
|
||
button.setAttribute('aria-pressed', active ? 'true' : 'false');
|
||
const label = active ? button.dataset.labelSaved : button.dataset.labelSave;
|
||
if (label) button.setAttribute('aria-label', label);
|
||
});
|
||
};
|
||
|
||
applyWish();
|
||
|
||
const form = root.querySelector('.product__form');
|
||
const qtyInput = root.querySelector('[data-qty-input]');
|
||
|
||
root.addEventListener('click', (event) => {
|
||
const wish = event.target.closest('[data-product-wish]');
|
||
if (wish && root.contains(wish)) {
|
||
const id = String(wish.dataset.productId || '');
|
||
if (!id) return;
|
||
const saved = readList(wishlistKey);
|
||
const next = saved.includes(id) ? saved.filter((item) => item !== id) : saved.concat(id);
|
||
window.localStorage.setItem(wishlistKey, JSON.stringify(next));
|
||
applyWish();
|
||
return;
|
||
}
|
||
|
||
const qtyButton = event.target.closest('[data-qty]');
|
||
if (qtyButton && qtyInput && root.contains(qtyButton)) {
|
||
const current = Math.max(1, Number(qtyInput.value) || 1);
|
||
qtyInput.value = String(qtyButton.dataset.qty === 'down' ? Math.max(1, current - 1) : current + 1);
|
||
return;
|
||
}
|
||
|
||
const option = event.target.closest('[data-variant]');
|
||
if (!option || !root.contains(option)) return;
|
||
root.querySelectorAll('[data-variant]').forEach((node) => {
|
||
node.classList.toggle('is-selected', node === option);
|
||
});
|
||
const idInput = form?.querySelector('[name="id"]');
|
||
if (idInput) idInput.value = option.dataset.id || idInput.value;
|
||
const price = root.querySelector('[data-price]');
|
||
if (price) price.textContent = option.dataset.price || '';
|
||
const compare = root.querySelector('[data-compare]');
|
||
if (compare) {
|
||
if (option.dataset.compare) {
|
||
compare.hidden = false;
|
||
compare.textContent = option.dataset.compare;
|
||
} else {
|
||
compare.hidden = true;
|
||
compare.textContent = '';
|
||
}
|
||
}
|
||
const optionLabel = root.querySelector('[data-option-template]');
|
||
if (optionLabel) {
|
||
const template = optionLabel.dataset.optionTemplate || '';
|
||
optionLabel.textContent = template.replace('__OPTION__', option.dataset.title || '');
|
||
}
|
||
const available = option.dataset.available === 'true';
|
||
const addButton = root.querySelector('[data-add]');
|
||
const buyButton = root.querySelector('[data-buy]');
|
||
if (addButton) {
|
||
addButton.disabled = !available;
|
||
addButton.textContent = available ? addButton.dataset.label || addButton.textContent : addButton.dataset.soldOut || addButton.textContent;
|
||
}
|
||
if (buyButton) buyButton.disabled = !available;
|
||
const main = root.querySelector('[data-main-image]');
|
||
if (main && option.dataset.image) {
|
||
main.removeAttribute('srcset');
|
||
main.src = option.dataset.image;
|
||
}
|
||
});
|
||
|
||
form?.addEventListener('submit', async (event) => {
|
||
const submitter = event.submitter;
|
||
if (!(submitter instanceof HTMLButtonElement) || !submitter.hasAttribute('data-buy')) return;
|
||
event.preventDefault();
|
||
if (submitter.disabled) return;
|
||
const variantId = form.querySelector('[name="id"]')?.value;
|
||
const quantity = Math.max(1, Number(qtyInput?.value) || 1);
|
||
if (!variantId) return;
|
||
submitter.disabled = true;
|
||
try {
|
||
const response = await fetch(`${form.action}.js`, {
|
||
method: 'POST',
|
||
headers: {
|
||
'Content-Type': 'application/json',
|
||
Accept: 'application/json',
|
||
},
|
||
body: JSON.stringify({ id: Number(variantId), quantity }),
|
||
});
|
||
if (!response.ok) {
|
||
form.submit();
|
||
return;
|
||
}
|
||
window.location.href = `${window.Shopify?.routes?.root || '/'}checkout`;
|
||
} catch (error) {
|
||
form.submit();
|
||
}
|
||
});
|
||
|
||
const usedHandles = () => {
|
||
return new Set(
|
||
[...root.querySelectorAll('.collection-card__title')]
|
||
.map((link) => {
|
||
const href = link.getAttribute('href') || '';
|
||
const parts = href.split('/').filter(Boolean);
|
||
return parts[parts.length - 1] || '';
|
||
})
|
||
.filter(Boolean)
|
||
);
|
||
};
|
||
|
||
const fillRecs = async (block) => {
|
||
if (!block || block.dataset.filled === 'true') return;
|
||
const list = block.querySelector('[data-recs-list]');
|
||
const productId = root.dataset.productId;
|
||
if (!list || !productId) return;
|
||
const base = (root.dataset.root || '/').replace(/\/?$/, '/');
|
||
const limit = Number(block.dataset.limit) || 4;
|
||
try {
|
||
const response = await fetch(
|
||
`${base}recommendations/products.json?product_id=${productId}&limit=${limit + 2}&intent=${block.dataset.recs || 'related'}`
|
||
);
|
||
if (!response.ok) throw new Error('recommendations');
|
||
const data = await response.json();
|
||
const skip = usedHandles();
|
||
skip.add(root.dataset.productHandle || '');
|
||
const products = (data.products || [])
|
||
.filter((item) => item && item.handle && !skip.has(item.handle))
|
||
.slice(0, limit);
|
||
if (!products.length) {
|
||
block.hidden = true;
|
||
return;
|
||
}
|
||
const cards = await Promise.all(
|
||
products.map(async (item) => {
|
||
const html = await fetch(`${base}products/${item.handle}?view=card`).then((result) => result.text());
|
||
const wrapper = document.createElement('div');
|
||
wrapper.innerHTML = html;
|
||
return wrapper.firstElementChild;
|
||
})
|
||
);
|
||
const nodes = cards.filter(Boolean);
|
||
if (!nodes.length) {
|
||
block.hidden = true;
|
||
return;
|
||
}
|
||
list.replaceChildren(...nodes);
|
||
block.hidden = false;
|
||
block.dataset.filled = 'true';
|
||
} catch (error) {
|
||
block.hidden = true;
|
||
}
|
||
};
|
||
|
||
(async () => {
|
||
const blocks = [...root.querySelectorAll('[data-product-block]')];
|
||
for (const block of blocks) {
|
||
await fillRecs(block);
|
||
}
|
||
})();
|
||
|
||
const reviewNodes = [...root.querySelectorAll('[data-review]')];
|
||
const pager = root.querySelector('[data-review-pager]');
|
||
if (reviewNodes.length && pager) {
|
||
const pageSize = 3;
|
||
const pageButtons = [...pager.querySelectorAll('[data-review-page]')];
|
||
const showPage = (page) => {
|
||
const maxPage = Math.max(0, pageButtons.length - 1);
|
||
const nextPage = Math.min(Math.max(0, page), maxPage);
|
||
reviewNodes.forEach((node, index) => {
|
||
const visible = index >= nextPage * pageSize && index < (nextPage + 1) * pageSize;
|
||
node.hidden = !visible;
|
||
});
|
||
pageButtons.forEach((button) => {
|
||
button.classList.toggle('is-current', Number(button.dataset.reviewPage) === nextPage);
|
||
});
|
||
pager.dataset.page = String(nextPage);
|
||
};
|
||
pager.addEventListener('click', (event) => {
|
||
const pageButton = event.target.closest('[data-review-page]');
|
||
if (pageButton) {
|
||
showPage(Number(pageButton.dataset.reviewPage));
|
||
return;
|
||
}
|
||
if (event.target.closest('[data-review-next]')) {
|
||
showPage(Number(pager.dataset.page || 0) + 1);
|
||
}
|
||
});
|
||
}
|
||
})();
|
||
{% endjavascript %}
|
||
|
||
{% schema %}
|
||
{
|
||
"name": "t:product_page.name",
|
||
"settings": [
|
||
{
|
||
"type": "paragraph",
|
||
"content": "t:product_page.metafields"
|
||
}
|
||
],
|
||
"disabled_on": {
|
||
"groups": ["header", "footer"]
|
||
}
|
||
}
|
||
{% endschema %}
|