{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_content %}
{% block page_product_detail %}
{% set productTranslatedCustomFields = page.product.translated.customFields %}
{% set productCustomFields = page.product.customFields %}
{% set isCreditProduct = productCustomFields.productIsBuyWithCredit ?? false %}
{% set id = page.product.id %}
{% set currentDeal = page.product.extensions.currentDeal ?: null %}
{# {% set productBuyerRewardConfigs = page.product.customFields['productBuyerRewardConfigs'] %} #}
{% set productBuyerRewardConfigs = currentDeal.referralTables ?: [] %}
{% set isBuyWithCredit = productCustomFields['productIsBuyWithCredit'] %}
{% set benefits = productCustomFields['benefits'] || null %}
{% set beforeAndAfterImg = productCustomFields['beforeAndAfterImg'] %}
{% set productInfosImg = productCustomFields['productInfosImg'] %}
{# {% set mediaCollection = searchMedia([beforeAndAfterImg, productInfosImg], context.context) %}
{% set beforeAndAfterImgMedia = mediaCollection.get(beforeAndAfterImg) %}
{% set productInfosMedia = mediaCollection.get(productInfosImg) %} #}
{% set productInfos = productCustomFields['productInfos'] %}
{% set selectedLanguage = (page.header.activeLanguage.translationCode.code ?: app.request.locale)|lower|split('-')[0] %}
{% if currentDeal is not null %}
{% if (currentDeal.marketPrice ?: [])|filter(v => v.currencyId == _context.context.currency.id)|first %}
{% set marketValue = currentDeal.marketPrice|filter(v => v.currencyId == _context.context.currency.id)|first.gross -%}
{% else %}
{% set marketValue = currentDeal.marketPrice.first.gross * _context.context.currency.factor %}
{% endif %}
{% endif %}
{% set productDiscountRateValue = productCustomFields.productDiscountRate %}
{# Filter out the rest of the jpg files (exclude mp4 and certificate jpg) #}
{% set restFiles = (page.product.media.elements ?: [])|filter(media => media.media.mimeType starts with 'image' and 'Certificate' not in media.media.fileName) %}
{% set productVideo = dataStream %}
{% set bannerImage = productCustomFields.mediaList.banner ?: page.product.cover.media %}
{% set topLeftImage = productCustomFields.mediaList.topLeft %}
{% set topRightImage = productCustomFields.mediaList.topRight %}
{% set video = productCustomFields.mediaList.video ?: (page.product.media.elements ?: [])|filter(media => media.media.mimeType starts with 'video')|first.media %}
{# {% set productLeftImage = productCustomFields.mediaList.productLeft ?: (restFiles|length > 0 ? random(restFiles).media : null) %} #}
{# {% set productTopRightImage = productCustomFields.mediaList.productTopRight ?: (restFiles|length > 0 ? random(restFiles).media : null) %} #}
{# {% set productBottomRightImage = productCustomFields.mediaList.productBottomRight ?: (restFiles|length > 0 ? random(restFiles).media : null) %} #}
{% set productLink = seoUrl('frontend.detail.page', {'productId': id}) %}
{% set productLinkWithReferral = productLink ~ (context.customer ? '?affiliateCode=' ~ context.customer.affiliateCode : '') %}
{% set desktopShareModal = "desktop-share-modal-" ~ id %}
{% set desktopShareModalContent %}
{% sw_include '@Storefront/storefront/component/aistream/modal/desktop-share-modal.html.twig' %}
{% endset %}
{% set discountRate = page.product.extensions.deals.elements|first.discountRate %}
{% set uiVersion = productCustomFields['uiVersion'] ?: 1 %}
{% set ingredientList = productCustomFields['ingredientList'] ?: null %}
{% set introduceList = productCustomFields['introduceList'] ?: null %}
{% set introduceMobileList = productCustomFields['introduceMobileList'] ?: introduceList %}
{% set study = productCustomFields['study'] ?: null %}
{% set buyable = page.product.available and page.product.childCount <= 0 and page.product.calculatedMaxPurchase > 0 %}
{% set isSubscriptionQuery = app.request.query.get('_query')['subscription'] == '1' %}
{% set subscriptionProduct = page.product.customFields.isBuyProductSubscription ?? false %}
{% set isSave4moreProduct = subscriptionProduct && isSubscriptionQuery %}
{% set planId = page.product.customFields.planId ?? false %}
{% set redirectProductSave4moreId = productCustomFields.productSubscriptionId ?: id %}
{% set introduceBenefitList = productCustomFields['introduceBenefitList'] ?: null %}
{% set bannerImageProduct = isSave4moreProduct ? productCustomFields.mediaList.bannerSave4more : bannerImage %}
{% set imageProduct = isSave4moreProduct ? productCustomFields.mediaList.productSave4more.url : page.product.cover.media.url %}
{% set bannerSave4more = productCustomFields.mediaList.bannerSave4more ?: page.product.cover.media %}
{% set imageProductSave4more = productCustomFields.mediaList.productSave4more.url ?: page.product.cover.media.url %}
{% set isLoggedIn = context.customer is defined %}
{% set jsonParams = '{"productId":"' ~ page.product.id ~ '"}' %}
{% set redirectParameters = jsonParams %}
{% set pathRedirectDetail = seoUrl('frontend.account.login', {
redirectTo: 'frontend.detail.page',
redirectParameters: redirectParameters
}) %}
{% set pathRedirectShop4free = path('frontend.account.login', {
redirectTo: 'frontend.shop4free'
}) %}
{% set redirectAfterLogin = isCreditProduct ? pathRedirectShop4free : pathRedirectDetail %}
{% set arrFeatureProduct = [
{
id: 1,
title: "app.productDetail.subscriptionTitle1"|trans,
},
{
id: 2,
title: "app.productDetail.subscriptionTitle2"|trans,
},
{
id: 3,
title: "app.productDetail.subscriptionTitle3"|trans,
},
{
id: 4,
title: "app.productDetail.subscriptionTitle4"|trans,
},
] %}
{# {% set outOfStock = ourOfStock %} #}
<div id="swm-product-detail" class="product-detail" itemscope
itemtype="https://schema.org/Product"
data-product-id="{{ page.product.id }}"
data-max-purchase="{{ page.product.calculatedMaxPurchase }}"
data-min-purchase="{{ page.product.minPurchase }}"
data-path="{{ path('frontend.data-stream') }}"
data-csrf="{{ sw_csrf('frontend.data-stream', {'mode': 'token'}) }}"
>
<div class="swm-product-detail">
<section class="swm_pdtop_banner_wrapper">
<div class="position-relative swm_pdtop_banner_container width-full">
<div class="swm_pdtop_banner_container_img-config">
{% if bannerImageProduct.mimeType starts with 'video' %}
<video class="swm_pdtop_banner_container_img swm-m-auto width-full" autoplay playsinline
muted>
<source src="{{ bannerImageProduct.url }}"
type="{{ bannerImageProduct.mimeType }}"/>
</video>
{% else %}
<img class="swm_pdtop_banner_container_img swm-m-auto width-full"
src="{{ bannerImageProduct.url }}">
{% endif %}
</div>
<div class="swm_pdtop_banner_container_img-save4more-config d-none-important">
{% if bannerSave4more.mimeType starts with 'video' %}
<video class="swm_pdtop_banner_container_img swm-m-auto width-full" autoplay playsinline
muted>
<source src="{{ bannerSave4more.url }}" type="{{ bannerSave4more.mimeType }}"/>
</video>
{% else %}
<img class="swm_pdtop_banner_container_img swm-m-auto width-full"
src="{{ bannerSave4more.url }}">
{% endif %}
</div>
<div class="position-absolute d-flex flex-col swm_pdtop_banner_txt_container gap-8px">
{% set productName = page.product.translated.name %}
{% if '(' in productName and ')' in productName %}
{% set productParts = productName|split('(') %}
<span class="swm_pdtop_banner_txt_title">{{ productParts[0]|trim }}<br/></span>
<span class="swm_pdtop_banner_txt_extra">{{ productParts[1]|replace({')': ''}) }}</span>
{% else %}
<span class="swm_pdtop_banner_txt_title">{{ productName }}<br/></span>
{% endif %}
</div>
<div class="position-absolute prod-detail-share-button-container">
{% sw_include '@Storefront/storefront/component/buttons/button-pill.html.twig' with {
className: 'swm-btn prod-detail-share-button d-flex' ,
label: 'app.share'|trans,
styleBtn: 'white-space: nowrap;',
classNameLabel: 'prod-detail-share-button-text text-heading-5-m',
icon: asset('bundles/shopwithmeui/assets/icons/product-detail/ic_share.svg') ,
styleIcon: 'width: 20px; height: 20px',
extraAttributes: {
'desktop-modal-target': '#' ~ desktopShareModal
}
} %}
</div>
</div>
</section>
<section class="swm_pdtop_slide_container d-flex flex-col">
{% if productCustomFields is not null %}
<div class="swm_pdtop_slide_container-content d-flex justify-between items-center m-tablet:flex-col mobile:flex-col gap-1rem">
<span class="swm_pdtop_slide_txt_top">{{ productCustomFields.subtitle }}</span>
<div class="d-flex swm_pdtop_slide_certi_container">
{% for certificate in productCustomFields.certificates %}
<div style="height: 120px; width: 120px;" class="align-center justify-center">
<img class="width-full" src="{{ certificate.media.url }}"/>
</div>
{% endfor %}
</div>
</div>
{% endif %}
<div class="d-flex flex-col" style="gap:20px">
<div class="swm_pdtop_slider_img d-flex mobile:flex-col">
{% if topLeftImage is not null %}
<div class="swm_pdtop_slider_img_1">
<img class="swm_pdtop_slider_img_mobile swm_prod_detail_img_radius_15"
src="{{ topLeftImage.url }}" width="100%"/>
</div>
{% endif %}
{% if topRightImage is not null %}
<div class="swm_pdtop_slider_img_2 flex-1">
<img class="swm_pdtop_slider_img_mobile swm_prod_detail_img_radius_15 object-fit-cover height-full"
src="{{ topRightImage.url }}" width="100%"/>
</div>
{% endif %}
</div>
{% if video is not null %}
<div class="position-relative">
<div id="swm_toggle_video" class="position-absolute items-center justify-center d-flex">
<div id="swm_icon_play_video">
<img src="{{ asset('bundles/shopwithmeui/assets/icons/ic_play.png') }}"
width="100%"/>
</div>
</div>
<video allow="autoplay" width="100%" height="100%" playsinline="true" loop
controlsList="nodownload" style="z-index: 1;"
id="swm_pdtop_video" class="swm_pdtop_slide_video">
<source src="{{ video.url }}" type="{{ video.mimetype }}"/>
</video>
</div>
{% endif %}
</div>
</section>
{% if uiVersion > 1 %}
{% if ingredientList is not null and ingredientList|length > 0 %}
{% set validIngredientList = ingredientList|filter(v => v is not null) %}
{% if validIngredientList|length > 0 %}
<div class="product-detail__technologies">
<div class="product-detail__technologies-list">
{% for ingredientItem in ingredientList %}
{% if ingredientItem %}
<div class="product-detail__technologies-item">
<img class="product-detail__technologies-item-img"
src="{{ ingredientItem.url }}"/>
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
{% endif %}
{% if introduceBenefitList is not null and introduceBenefitList|length > 0 %}
<div class="product-detail__benefits">
{% for introduceItem in introduceBenefitList %}
{% if introduceItem and introduceItem.items|length >= 2 %}
{% set leftItem = introduceItem.items[0] %}
<div class="layout__benefit">
<div class="layout__benefit-item-left">
<div class="mobile:d-none-important"></div>
{# Góc trên bên trái: text #}
<div class="layout__benefit-item-left-before">
{% if leftItem %}
<div class="benefit-text">
{% if leftItem.title %}
<div class="benefit-title">{{ leftItem.title }}</div>
{% endif %}
{% if leftItem.description %}
<div class="benefit-description">{{ leftItem.description }}</div>
{% endif %}
</div>
{% endif %}
</div>
{# Góc dưới bên trái: image #}
<div class="layout__benefit-item-left-after layout__benefit-item-left-after-mobile">
{% if leftItem and leftItem.image %}
<img class="layout__benefit-item-left-after-img"
src="{{ leftItem.image.url }}"/>
{% endif %}
</div>
<div class="layout__benefit-item-left-after layout__benefit-item-left-after-desktop">
{% if leftItem and leftItem.image %}
<img class="layout__benefit-item-left-after-img"
src="{{ leftItem.image.url }}"/>
{% endif %}
</div>
</div>
<div class="layout__benefit-item-right">
{# Góc trên bên phải: image #}
<div class="layout__benefit-item-right-before">
{% set rightItem = introduceItem.items[1] %}
{% if rightItem and rightItem.image %}
<img class="layout__benefit-item-right-before-img"
src="{{ rightItem.image.url }}"/>
{% endif %}
</div>
{# Góc dưới bên phải: text #}
<div class="layout__benefit-item-right-after">
{% if rightItem %}
<div class="benefit-text">
{% if rightItem.title %}
<div class="benefit-title">{{ rightItem.title }}</div>
{% endif %}
{% if rightItem.description %}
<div class="benefit-description">{{ rightItem.description }}</div>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% else %}
{% if introduceList is not null and introduceList|length > 0 %}
<div class="product-detail__benefits">
{% for introduceItem in introduceList %}
{% if introduceItem %}
<div class="layout__benefit">
<div class="layout__benefit-item-left">
<div class="mobile:d-none-important"></div>
<div class="layout__benefit-item-left-before">
{% if introduceItem.firstImage %}
<img class="layout__benefit-item-left-before-img"
src="{{ introduceItem.firstImage.url }}"/>
{% endif %}
</div>
<div class="layout__benefit-item-left-after">
{% if introduceItem.secondImage %}
<img class="layout__benefit-item-left-after-img"
src="{{ introduceItem.secondImage.url }}"/>
{% endif %}
</div>
</div>
<div class="layout__benefit-item-right">
<div class="layout__benefit-item-right-before">
{% if introduceItem.thirdImage %}
<img class="layout__benefit-item-right-before-img"
src="{{ introduceItem.thirdImage.url }}"/>
{% endif %}
</div>
<div class="layout__benefit-item-right-after">
{% if introduceItem.fourthImage %}
<img class="layout__benefit-item-right-after-img"
src="{{ introduceItem.fourthImage.url }}"/>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if introduceMobileList is not null and introduceMobileList|length > 0 %}
<div class="product-detail__benefits-mobile d-none">
{% for introduceItem in introduceMobileList %}
{% if introduceItem %}
<div class="layout__benefit-mobile">
<div class="layout__benefit-item-left">
{% if introduceItem.firstImage %}
<div class="layout__benefit-item-left-before">
<img class="layout__benefit-item-left-before-img"
src="{{ introduceItem.firstImage.url }}"/>
</div>
{% endif %}
{% if introduceItem.secondImage %}
<div class="layout__benefit-item-left-after">
<img class="layout__benefit-item-left-after-img"
src="{{ introduceItem.secondImage.url }}"/>
</div>
{% endif %}
</div>
<div class="layout__benefit-item-right">
{% if introduceItem.thirdImage %}
<div class="layout__benefit-item-right-after">
<img class="layout__benefit-item-right-after-img"
src="{{ introduceItem.thirdImage.url }}"/>
</div>
{% endif %}
{% if introduceItem.fourthImage %}
<div class="layout__benefit-item-right-before">
<img class="layout__benefit-item-right-before-img"
src="{{ introduceItem.fourthImage.url }}"/>
</div>
{% endif %}
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endif %}
{% if study is not null and study.image is not null %}
<div class="product-detail__certificate">
<div class="product-detail__certificate-box">
<img class="product-detail__certificate-img"
src="{{ study.image.url }}"/>
</div>
</div>
{% endif %}
{% else %}
{% if productCustomFields.benefitsList|length > 0 %}
<section class="section-5__product_detail">
<div class="section-5__product_detail-header text-heading-2-b swm-mt-8 swm-mb-10 text-center">
{{ 'app.productDetail.productBenefits.title'|trans }}
</div>
<div class="section-5__product_detail-container d-flex items-start justify-between">
{% for benefitItem in productCustomFields.benefitsList %}
<div class="section-5__product_detail-container-item d-flex flex-col items-center">
<div class="section-5__product_detail-container-item-img overflow-hidden swm-mb-4">
<img src="{{ benefitItem.media.url }}"
class="item-img-product-detail width-full height-full"/>
</div>
<div class="section-5__product_detail-container-item-content text-center">
<div class="section-5__product_detail-container-item-content-name typo-head-4-b swm-mb-4">
{{ benefitItem.name }}
</div>
<div class="section-5__product_detail-container-item-content-name typo-sub-text-2">
{{ benefitItem.description }}
</div>
</div>
</div>
{% endfor %}
</div>
</section>
{% endif %}
{% endif %}
<section
class="productDetail_product_wrapper swm-m-auto">
<!--Container-->
<div
class="d-flex flex-col gap-1.5rem">
<!--Title-->
<div class="d-flex flex-col" style="gap:9px">
<p class="login__title__title">{{ page.product.translated.name }}</p>
<div class="d-flex gap-1rem">
{% for tag in productCustomFields.productTags %}
<button class="swm-btn swm-btn-certificate">
{{ tag.name }}
</button>
{% endfor %}
</div>
</div>
<!--Product-->
<div
class="d-flex m-tablet:flex-col mobile:flex-col" style="gap:46px;">
<!--Images-->
<div class="product-detail__information__left d-flex productDetail_product_images_wrapper">
<div class="product-detail__information__left__image mobile:m-auto productDetail_product_images_main overflow-hidden radius-15px">
<img loading="lazy" class="product-detail__information__left__image-img"
src="{{ imageProduct }}"/>
<img loading="lazy"
class="product-detail__information__left__image-save4more-config d-none-important"
src="{{ imageProductSave4more }}"/>
</div>
</div>
<!--Infos-->
<div
class="product-detail__information__right d-flex flex-col"
style="gap: 21px; flex: 1;">
<!--Cao đao-->
<div class="homePage_productList_cao_dao d-flex gap-1rem items-center justify-between swm-p-3">
<div class="d-flex" style="gap: 4px;">
<img src="{{ asset('bundles/shopwithmeui/assets/icons/lighting-circle.svg') }}"/>
<span class="homePage_productList_cao_dao_text">{{ 'app.home.listing.timeLeft'|trans }}</span>
</div>
<div class="deals-expiration-timer homePage_productList_cao_dao_time d-flex items-center"
data-expired-text="{{ 'app.expired'|trans|sw_sanitize }}"
data-expired-time="{{ currentDeal.endDate|date("U") }}"></div>
</div>
<!--Quantity-->
<div class="d-flex flex-col" style="gap: 21px;">
<div class="productDetail_product_optional d-flex flex-col" style="gap: 21px;">
<div class="productDetail_product_optional_order-right d-flex flex-col">
{% if not subscriptionProduct %}
<div class="d-flex flex-col product-detail-quantity" style="gap: 12px;">
<p class="typo-head-5">{{ 'app.quantity'|trans }}</p>
{% if isLoggedIn %}
<div class="d-flex" style="gap: 12px;">
<button id="decreaseBtn"
class="productDetail_product_quantity_minus radius-8px cursor-pointer">
<img src="{{ asset('bundles/shopwithmeui/assets/icons/ic_minus.svg') }}"/>
</button>
<input id="quantityInput"
class="productDetail_product_quantity radius-8px d-flex text-center no-arrows"
value="1" type="number" min="1"
data-productId="{{ page.product.id }}">
<button id="increaseBtn"
class="productDetail_product_quantity_minus radius-8px cursor-pointer">
<img src="{{ asset('bundles/shopwithmeui/assets/icons/ic_plus.svg') }}"/>
</button>
</div>
{% else %}
<div class="d-flex" style="gap: 12px;">
<a href="{{ redirectAfterLogin }}">
<button class="productDetail_product_quantity_minus radius-8px cursor-pointer">
<img src="{{ asset('bundles/shopwithmeui/assets/icons/ic_minus.svg') }}"/>
</button>
</a>
<input id="quantityInput"
class="productDetail_product_quantity radius-8px d-flex text-center no-arrows"
value="1" type="number" min="1"
data-productId="{{ page.product.id }}">
<a href="{{ redirectAfterLogin }}">
<button class="productDetail_product_quantity_minus radius-8px cursor-pointer">
<img src="{{ asset('bundles/shopwithmeui/assets/icons/ic_plus.svg') }}"/>
</button>
</a>
</div>
{% endif %}
<div class="product-item-error d-none">{{ 'app.limit'|trans }} {{ page.product.calculatedMaxPurchase }} {{ 'app.perOrder'|trans }}</div>
</div>
{% endif %}
</div>
<div class="d-flex flex-col gap-8px">
{% set dealSaved = marketValue - page.product.calculatedPrice.unitPrice %}
<!--Price Saving-->
<div class="d-flex gap-8px">
<div class="d-flex gap-8px flex-wrap">
<p class="productDetail_product_origin_price typo-head-5">{{'app.productDetail.product.regularPrice'|trans|sw_sanitize}}:</p>
<p class="productDetail_product_origin_price line-through typo-head-5">{{ marketValue|currency }}</p>
</div>
{# {% if discountRate is not null %}
<p class="productDetail_product_origin_price_savings typo-head-5 {% if isSave4moreProduct %} productDetail_product_origin_price_savings-color-save4more {% endif %}">{{ discountRate }}
%</p>
<p class="productDetail_product_origin_price_savings typo-head-5 {% if isSave4moreProduct %} productDetail_product_origin_price_savings-color-save4more {% endif %}">{{ 'app.savings'|trans }}</p>
{% endif %} #}
</div>
<!--Final Price-->
<div class="d-flex items-center gap-1rem">
<div class="productDetail_product_origin_price_savings typo-head-4-b d-flex items-center gap-4px flex-wrap {% if isSave4moreProduct %} productDetail_product_origin_price_savings-color-save4more {% endif %}">
<span class="productDetail_product_origin_price typo-head-5">{{'app.productDetail.product.todayPrice'|trans|sw_sanitize}}:</span>
{{ page.product.calculatedPrice.unitPrice|currency }}
{% if context.customer.affiliateCode is not null and context.customer.campaignCode is not null %}
{% if context.customer.affiliateCode == context.customer.campaignCode %}
{% if page.product.customFields.pointValue %}
<span>
({{ page.product.customFields.pointValue }} PV)
{# {{ 'app.productDetail.product.point'|trans|sw_sanitize }} #}
</span>
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
<div class="d-flex items-center gap-4px flex-wrap">
<span class="productDetail_product_origin_price typo-head-5">{{'app.productDetail.product.youSave'|trans|sw_sanitize}}:</span>
<span class="productDetail_product_origin_price_savings typo-head-4-b">{{ dealSaved|currency }}</span>
{% if discountRate %}
<span class="productDetail_product_origin_price typo-head-5">({{discountRate}}% {{'app.productDetail.product.discount'|trans|sw_sanitize}})</span>
{% endif %}
</div>
</div>
{# {% if buyable == false or outOfStock %} #}
{% if buyable == false %}
<div class="error_out_of_stock">{{ 'app.productNotAvailable'|trans }}</div>
{% endif %}
{% if isSave4moreProduct and planId == false %}
<div class="error_out_of_stock">{{ 'app.planIdBuyWithSubcription'|trans }}</div>
{% endif %}
<!--Buttons-->
{% if subscriptionProduct %}
<a href="{{ hasActiveSubscription ? '#' : seoUrl('frontend.checkout.subscription', {'id': page.product.id}) }}"
class="productDetail-btn-save4more text-decoration-none {{ hasActiveSubscription ? 'disabled-link-save4more' : '' }}">
{% set extraAttributes = not planId or buyable == false ? { 'disabled': true } : {} %}
{% sw_include '@Storefront/storefront/component/buttons/button-primary.html.twig' with {
id: page.product.id,
className: 'subscription-buy-btn',
label: "app.productDetail.buyWithSubscription"|trans,
icon: 'bundles/shopwithmeui/assets/icons/prod_buynow.svg',
extraAttributes: extraAttributes
} %}
</a>
{% if hasActiveSubscription %}
<p class="error_out_of_stock">{{ 'app.productDetail.hasActiveSubscription'|trans|sw_sanitize }}</p>
{% endif %}
<div class="productDetail_list_feature d-flex flex-col gap-16px">
{% for feature in arrFeatureProduct %}
<div class="d-flex align-center justify-start gap-1">
<img src="{{ asset('bundles/shopwithmeui/assets/icons/checked_icon.svg') }}"/>
<span class="productDetail_list_feature-title">
{{ feature.title }}
</span>
</div>
{% endfor %}
</div>
{% else %}
<div class="productDetail-btns-order d-flex gap-1rem"
style="flex-wrap: wrap;">
{% sw_include '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' with {
isHeaderButton: false,
isAddToCart: false,
fullWidth: false,
} %}
{% sw_include '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' with {
isHeaderButton: false,
isAddToCart: true,
fullWidth: false,
} %}
{# {% set isShop4freeProduct = true %}
{% if isShop4freeProduct %}
<button class="section-2__shop4free-content-product-info-description-btn button-square button-primary d-flex items-center shop4free-purchase-btn"
title="Shop4free now"
aria-label="Shop4free now"
data-product-id= "{{ product.id }}"
data-product-name= "{{ product.translated.name }}"
data-product-credit= "{{ product.customFields.productCreditPrice }}"
desktop-modal-target='#{{context.customer ? desktopFreePurchaseModal : ''}}'
>
<div class="section-2__shop4free-content-product-info-description-title d-flex items-center justify-between">
<div class="d-flex flex-col items-start gap-8px">
<span class="{{classTextButton}} button-title typo-sub-text-2 section-2__shop4free-content-product-info-description-title-text">{{'app.shop4freeNowButton'|trans}}</span>
</div>
<svg width="18" height="18" viewBox="0 0 18 18" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M9 17C11.1217 17 13.1566 16.1571 14.6569 14.6569C16.1571 13.1566 17 11.1217 17 9C17 6.87827 16.1571 4.84344 14.6569 3.34315C13.1566 1.84285 11.1217 1 9 1"
stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
<path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" />
</svg>
</div>
<svg width="18" height="18" viewBox="0 0 18 18" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M9 17C11.1217 17 13.1566 16.1571 14.6569 14.6569C16.1571 13.1566 17 11.1217 17 9C17 6.87827 16.1571 4.84344 14.6569 3.34315C13.1566 1.84285 11.1217 1 9 1"
stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
<path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" />
</svg>
</div>
</button>
{% endif %} #}
</div>
{% endif %}
<div class="productDetail_list_feature d-flex flex-col gap-16px {% if not isSave4moreProduct %} d-none-important {% endif %}">
{% for feature in arrFeatureProduct %}
<div class="d-flex align-center justify-start gap-1">
<img src="{{ asset('bundles/shopwithmeui/assets/icons/checked_icon.svg') }}"/>
<span class="productDetail_list_feature-title">
{{ feature.title }}
</span>
</div>
{% endfor %}
</div>
</div>
{% if ( not subscriptionProduct ) and ( productCustomFields.productSubscriptionId is not null ) %}
<div class="product_detail_join_save4more d-flex items-center justify-between">
<div class="product_detail_join_save4more-left d-flex items-center gap-4px">
<img src="{{ asset('bundles/shopwithmeui/assets/icons/autoship_save4more.svg') }}"/>
<div class="product_detail_join_save4more-left-content d-flex flex-col gap-8px">
<span class="product_detail_join_save4more-left-content-head text-body-m-b">{{ "app.productDetail.enjoySave4more"|trans }}</span>
<span class="product_detail_join_save4more-left-content-title text-smallest-b">{{ "app.productDetail.subscribe"|trans }}</span>
</div>
</div>
<div class="product_detail_join_save4more-right">
<a href="{{ seoUrl('frontend.detail.page', {'productId': redirectProductSave4moreId}) }}"
class="text-decoration-none">
<button class="product_detail_join_save4more-right-action-btn swm-btn swm-btn-shop4free-secondary text-smallest-b">
{{ 'app.home.learnMore'|trans }}
</button>
</a>
</div>
</div>
{% endif %}
</div>
<!--Product Infos-->
<div class="d-flex flex-col" style="gap: 21px;">
{% if productTranslatedCustomFields.promotion %}
<div class="productDetail_product_infos swm-btn swm-btn-shop4free-primary flex-col toggleButton">
<div class="d-flex justify-between">
<span class="productDetail_product_infos_title typo-sub-text-4-smb d-flex items-center">{{ 'app.productDetail.product.promotion'|trans }}</span>
<img class="cursor-pointer"
src="{{ asset('bundles/shopwithmeui/assets/icons/prod_dropdown.svg') }}"/>
</div>
<div class="productDetail_product_infos_des typo-sub-text-2 d-none">{{ productTranslatedCustomFields.promotion|raw }}</div>
</div>
{% endif %}
<div class="productDetail_product_infos swm-btn swm-btn-shop4free-primary flex-col toggleButton">
<div class="d-flex justify-between">
<span class="productDetail_product_infos_title typo-sub-text-4-smb d-flex items-center">{{ 'app.productDetail.product.description'|trans }}</span>
<img class="cursor-pointer"
src="{{ asset('bundles/shopwithmeui/assets/icons/prod_dropdown.svg') }}"/>
</div>
<div class="productDetail_product_infos_des typo-sub-text-2 d-none">{{ page.product.translated.description|raw }}</div>
</div>
<div class="productDetail_product_infos swm-btn swm-btn-shop4free-primary flex-col toggleButton">
<div class="d-flex justify-between">
<span class="productDetail_product_infos_title typo-sub-text-4-smb d-flex items-center">{{ 'app.productDetail.product.benefits'|trans }}</span>
<img class="cursor-pointer"
src="{{ asset('bundles/shopwithmeui/assets/icons/prod_dropdown.svg') }}"/>
</div>
<div class="productDetail_product_infos_des typo-sub-text-2 d-none">{{ productTranslatedCustomFields.benefits|raw }}</div>
</div>
<div class="productDetail_product_infos swm-btn swm-btn-shop4free-primary flex-col toggleButton">
<div class="d-flex justify-between">
<span class="productDetail_product_infos_title typo-sub-text-4-smb d-flex items-center">{{ productTranslatedCustomFields.ingredientLabel ?: 'app.productDetail.product.ingredients'|trans }}</span>
<img class="cursor-pointer"
src="{{ asset('bundles/shopwithmeui/assets/icons/prod_dropdown.svg') }}"/>
</div>
<div class="productDetail_product_infos_des typo-sub-text-2 d-none">{{ productTranslatedCustomFields.ingredients|raw }}
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<section class="section-5__home__experience swm-m-auto overflow-hidden swm-mb-8"
data-video-list-plugin="true"
data-path="{{ path('frontend.data-stream') }}"
data-csrf="{{ sw_csrf('frontend.data-stream', {'mode': 'token'}) }}"
data-product-id="{{ page.product.id }}"
data-type="details">
<div class="section-5__home__experience-header typo-head-2">
{{ 'app.aiStream'|trans }}
</div>
<div class="section-5__home__experience-container d-flex items-center justify-start">
</div>
</section>
{# <div class="section-5__home__experience-container_mobile d-flex items-center justify-start"> #}
{# {% if productVideo|first %} #}
{# {% set video = null %} #}
{# {% if productVideo|first.postChildren.elements && productVideo|first.postChildren.elements|first %} #}
{# {% set video = productVideo|first.postChildren.elements|first.file.fileUrl %} #}
{# {% endif %} #}
{# <div class="section-5__home__experience-container-item border-radius-1 position-relative overflow-hidden"> #}
{# <div id="home_aiStream_play" #}
{# class="section-5__home__experience-container-item-content position-absolute d-flex justify-between flex-col"> #}
{# <div class="section-5__home__experience-container-item-tag d-flex items-center justify-start"> #}
{# <img src="/bundles/shopwithmetheme/assets/icons/mage_video.svg" #}
{# class="item_experience_img_icon"> #}
{# <span class="section-5__home__experience-container-item-tag-name typo-sub-text-4-smb">Consumer #}
{# Electronics</span> #}
{# </div> #}
{# <div class="section-5__home__experience_container_mobile_navigation position-absolute d-flex flex-col"> #}
{# <div class="d-flex gap-1rem flex-col section-5__home__experience_container_mobile_navigation_actions"> #}
{# <div class="section-5__home__experience_container_mobile_navigation_action d-flex flex-col items-center"> #}
{# <img class="section-5__home__experience_container_mobile_navigation_action_img" #}
{# src="/bundles/shopwithmetheme/assets/imgs/aiStream_heart.svg"/> #}
{# <span class="typo-sub-text-4 section-5__home__experience_container_mobile_navigation_info">{{ productVideo|first.likeCount }}</span> #}
{# </div> #}
{# <div class="section-5__home__experience_container_mobile_navigation_action d-flex flex-col items-center"> #}
{# <img class="section-5__home__experience_container_mobile_navigation_action_img" #}
{# src="/bundles/shopwithmetheme/assets/imgs/aiStream_edit.svg"/> #}
{# <span class="typo-sub-text-4 section-5__home__experience_container_mobile_navigation_info">10k</span> #}
{# </div> #}
{# <div class="section-5__home__experience_container_mobile_navigation_action d-flex flex-col items-center"> #}
{# <img class="section-5__home__experience_container_mobile_navigation_action_img" #}
{# src="/bundles/shopwithmetheme/assets/imgs/aiStream_cart.svg"/> #}
{# </div> #}
{# </div> #}
{# <div class=" gap-8px d-flex flex-col"> #}
{# <img src="/bundles/shopwithmetheme/assets/imgs/aiStream_navUp.svg"/> #}
{# <img src="/bundles/shopwithmetheme/assets/imgs/aiStream_navDown.svg"/> #}
{# </div> #}
{# </div> #}
{# <div class="section-5__home__experience_container_mobile_video_infor d-flex flex-col"> #}
{# <div class="section-5__home__experience_container_video_infor_user_info d-flex items-center"> #}
{# <img class="section-5__home__experience_container_video_avatar_image" #}
{# src="/bundles/shopwithmeui/assets/imgs/shop_with_me.svg"/> #}
{# <span class="section-5__home__experience_container_username typo-sub-text-4">{{ productVideo|first.postUser }}</span> #}
{# </div> #}
{# <div class="section-5__home__experience_container_video_infor d-flex flex-col gap-8px"> #}
{# <span class="section-5__home__experience_container_video_infor_product_name">{{ productVideo|first.product.translated.name }}</span> #}
{# <div id="userScore" #}
{# class="section-5__home__experience_container_mobile_video_infor_truncate-text-container d-flex"> #}
{# <span class="typo-sub-text-5-smb section-5__home__experience_container_video_infor_user_review truncate-text truncated"> #}
{# {{ productVideo|first.product.translated.description|raw }} #}
{# </span> #}
{# <span class="typo-sub-text-5-smb show-more-btn">more</span> #}
{# </div> #}
{# </div> #}
{# </div> #}
{# <div class="section-5__home__experience_container_mobile_video_pause_button position-absolute"> #}
{# <img id="home_aiStream_play_button" #}
{# src="/bundles/shopwithmetheme/assets/imgs/aiStream_play.svg"/> #}
{# </div> #}
{# </div> #}
{# <video id="home_aiStream_vid" #}
{# class="section-5__home__experience-container-item-img item_experience_img" muted #}
{# playsinline loop> #}
{# <source src="/bundles/shopwithmetheme/assets/video-eg.mp4" type="video/mp4"/> #}
{# </video> #}
{# <div class="section-5__home__experience-container-item-overlay position-absolute"></div> #}
{# </div> #}
{# {% endif %} #}
{# </div> #}
</div>
{# Modal #}
{% sw_include '@Storefront/storefront/component/aistream/desktop-common-modal.html.twig' with {
id: desktopShareModal,
height: '100%',
className: 'lazy-load-modal full-screen appear-center',
style: 'position: fixed !important; background-color: #00000066;',
content: desktopShareModalContent|raw,
showTopNut: false,
} %}
{% endblock %}
<script>
const caodaoTimeProductDetail = {{ currentDeal.endDate|date("U") is not empty ? currentDeal.endDate|date("U")|json_encode|raw : 'null' }};
const translationsProductDetail = {
expired: "{{ 'app.expired'|trans|sw_sanitize }}",
addToCartSuccess: "{{ 'app.addToCartSuccess'|trans|sw_sanitize }}",
addToCartFailed: "{{ 'app.addToCartFailed'|trans|sw_sanitize }}",
};
const checkoutLinks = {
checkoutCartLink: "{{ seoUrl('frontend.checkout.cart.page') }}",
}
</script>
{% endblock %}