custom/plugins/ShopWithMeUI/src/Resources/views/storefront/section/cms-section-homepage.html.twig line 1

Open in your IDE?
  1. {% block page_content_section_default %}
  2.     {% set layout = section.sizingMode ? section.sizingMode|replace({"_": "-"}) : "container" %}
  3.     {% set pageHead = page %}
  4.     {% set bannerImageLink = config('ShopWithMeUI.config.BannerImageLink') %}
  5.     {% set bannerImageLinkPartner = config('ShopWithMeUI.config.BannerImageLinkPartner') %}
  6.     {% set linkBanner = config('ShopWithMeUI.config.LinkBanner') %}
  7.     {% set linkBannerPartner = config('ShopWithMeUI.config.LinkBannerPartner') %}
  8.     {% set isLoggedIn = context.customer is defined %}
  9.     {% set translationCode = page.header.activeLanguage.translationCode.code|lower|split('-') %}
  10.     {% set countryLocal = translationCode[1] %}
  11. <div id="swm_homepage" class="cms-section-default">
  12.     <div>
  13.         {% if countryLocal not in ['vn', 'th'] %}
  14.             {% if countryLocal in ['cn', 'hk'] %}
  15.                 <div class="home_header_video-box overflow-hidden" style="height: auto;">
  16.                     <div class="mobile:d-none desktop-carousel home_header_video-box-desktop">
  17.                         <div class="carousel-track">
  18.                             <div class="carousel-slide">
  19.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b1-Website-hk.webp')  }}" />
  20.                             </div>
  21.                             <div class="carousel-slide">
  22.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b2-Website-hk.webp')  }}" />
  23.                             </div>
  24.                         </div>
  25.                         <button class="carousel-btn prev">{% sw_icon 'arrow-head-left' style { 'size': 'sm' } %}</button>
  26.                         <button class="carousel-btn next">{% sw_icon 'arrow-head-right' style { 'size': 'sm' } %}</button>
  27.                     </div>
  28.                     <div class="mobile:d-block d-none mobile-carousel home_header_video-box-mobile">
  29.                         <div class="carousel-track">
  30.                             <div class="carousel-slide">
  31.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b1-mobile-hk.webp')  }}" />
  32.                             </div>
  33.                             <div class="carousel-slide">
  34.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b2-mobile-hk.webp')  }}" />
  35.                             </div>
  36.                         </div>
  37.                         <button class="carousel-btn prev">{% sw_icon 'arrow-head-left' style { 'size': 'sm' } %}</button>
  38.                         <button class="carousel-btn next">{% sw_icon 'arrow-head-right' style { 'size': 'sm' } %}</button>
  39.                     </div>
  40.                 </div>
  41.             {% elseif countryLocal in ['de'] %}
  42.                 <div class="home_header_video-box overflow-hidden" style="height: auto;">
  43.                     <div class="mobile:d-none desktop-carousel home_header_video-box-desktop">
  44.                         <div class="carousel-track">
  45.                             <div class="carousel-slide">
  46.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b1-Website-de.webp')  }}" />
  47.                             </div>
  48.                             <div class="carousel-slide">
  49.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b2-Website-de.webp')  }}" />
  50.                             </div>
  51.                         </div>
  52.                         <button class="carousel-btn prev">{% sw_icon 'arrow-head-left' style { 'size': 'sm' } %}</button>
  53.                         <button class="carousel-btn next">{% sw_icon 'arrow-head-right' style { 'size': 'sm' } %}</button>
  54.                     </div>
  55.                     <div class="mobile:d-block d-none mobile-carousel home_header_video-box-mobile">
  56.                         <div class="carousel-track">
  57.                             <div class="carousel-slide">
  58.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b1-mobile-de.webp')  }}" />
  59.                             </div>
  60.                             <div class="carousel-slide">
  61.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b2-mobile-de.webp')  }}" />
  62.                             </div>
  63.                         </div>
  64.                         <button class="carousel-btn prev">{% sw_icon 'arrow-head-left' style { 'size': 'sm' } %}</button>
  65.                         <button class="carousel-btn next">{% sw_icon 'arrow-head-right' style { 'size': 'sm' } %}</button>
  66.                     </div>
  67.                 </div>
  68.             {% else %}
  69.                 <div class="home_header_video-box overflow-hidden" style="height: auto;">
  70.                     <div class="mobile:d-none desktop-carousel home_header_video-box-desktop">
  71.                         <div class="carousel-track">
  72.                             <div class="carousel-slide">
  73.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b1-Website-en.webp')  }}" />
  74.                             </div>
  75.                             <div class="carousel-slide">
  76.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b2-Website-en.webp')  }}" />
  77.                             </div>
  78.                         </div>
  79.                         <button class="carousel-btn prev">{% sw_icon 'arrow-head-left' style { 'size': 'sm' } %}</button>
  80.                         <button class="carousel-btn next">{% sw_icon 'arrow-head-right' style { 'size': 'sm' } %}</button>
  81.                     </div>
  82.                     <div class="mobile:d-block d-none mobile-carousel home_header_video-box-mobile">
  83.                         <div class="carousel-track">
  84.                             <div class="carousel-slide">
  85.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b1-mobile-en.webp')  }}" />
  86.                             </div>
  87.                             <div class="carousel-slide">
  88.                                 <img src="{{ asset('bundles/shopwithmeui/assets/imgs/april-deals/banner-b2-mobile-en.webp')  }}" />
  89.                             </div>
  90.                         </div>
  91.                         <button class="carousel-btn prev">{% sw_icon 'arrow-head-left' style { 'size': 'sm' } %}</button>
  92.                         <button class="carousel-btn next">{% sw_icon 'arrow-head-right' style { 'size': 'sm' } %}</button>
  93.                     </div>
  94.                 </div>
  95.             {% endif %}
  96.         {% endif %}
  97. {#        {% if countryLocal not in ['cn', 'hk', 'vn'] %}#}
  98. {#            <div class="home_header_video-box overflow-hidden">#}
  99. {#                <video class="home_header_video-box-video" width="100%" height="100%" autoplay playsinline loop controls muted>#}
  100. {#                    <source onload="" src="https://sg-media.shopwithme.info/images/2024/12/03/87e57cb44617c7ea58d2da1b1886f351.mp4" type="video/mp4"/>#}
  101. {#                    <!-- <source src="/bundles/shopwithmeui/assets/video-eg.mp4" type="video/ogg" /> -->#}
  102. {#                    {{ 'app.noVid'|trans }}#}
  103. {#                </video>#}
  104. {#            </div>#}
  105. {#        {% endif %}#}
  106.         
  107.         {% if bannerImageLinkPartner and context.customer.affiliateCode == context.customer.campaignCode and isLoggedIn %}
  108.             {% set bannerSrc = bannerImageLinkPartner %}
  109.             {% set bannerLink = linkBannerPartner %}
  110.         {% elseif bannerImageLink %}
  111.             {% set bannerSrc = bannerImageLink %}
  112.             {% set bannerLink = linkBanner %}
  113.         {% else %}
  114.             {% set bannerSrc = null %}
  115.             {% set bannerLink = null %}
  116.         {% endif %}
  117.         {% if bannerSrc and countryLocal not in ['cn', 'hk', 'vn'] %}
  118.             <section class="banner-image-section">
  119.                 <a class="swm-m-auto" {% if bannerLink %}target="_blank" href="{{ bannerLink }}"{% endif %}>
  120.                     <img src="{{ bannerSrc }}" alt="">
  121.                 </a>
  122.             </section>
  123.         {% endif %}
  124.         <!--Subscription Banner-->
  125.         {% if productResult and countryLocal not in ['cn', 'hk', 'vn'] %}
  126.             <section class="banner-image-section">
  127.                 <a href="{{ seoUrl('frontend.detail.page', {'productId': productResult.id, '_query': { 'subscription': '1' }}) }}"
  128.                    class="save4more_homepage-banner width-full">
  129.                     <img src-lazy="{{ asset('bundles/shopwithmeui/assets/imgs/save4more/home/banner.png') }}"
  130.                          class="width-full"/>
  131.                 </a>
  132.             </section>
  133.         {% endif %}
  134.         <section
  135.                 class="homePage_promotionBanner_wrapper" {% if countryLocal in ['cn', 'hk', 'vn'] %} style="padding-top: 96px" {% endif %}>
  136.             <!--Container-->
  137.             <div class="homePage_promotionBanner_container d-flex gap-1.5rem swm-m-auto mobile:flex-col">
  138.                 <!--shop4free-->
  139.                 {% if countryLocal in ['cn', 'hk'] %}
  140.                     <div class="homePage_promotionBanner_shop4free homePage_promotionBanner_container_items homePage_promotionBanner_container_items-reverse d-flex flex-col">
  141.                         <!--Images-->
  142.                         <div class="homePage_promotionBanner_right_images-reverse d-flex justify-center">
  143.                             <img class="radius-8px"
  144.                                  src-lazy="{{ asset('bundles/shopwithmeui/assets/imgs/home_save4more.jpg') }}"
  145.                                  width="100%"/>
  146.                         </div>
  147.                         <!--Title-->
  148.                         <div class="homePage_promotionBanner_shop4free_title gap-1.5rem d-flex flex-col">
  149.                             <!--Text-->
  150.                             <div class="d-flex flex-col gap-8px">
  151.                                 <p class="homePage_promotionBanner_text typo-head-4-b">{{ 'app.home.promotion.promotionSave4moreTitleHK'|trans }}</p>
  152.                                 <p class="homePage_promotionBanner_subtext typo-sub-text-3">{{ 'app.home.promotion.promotionSave4moreSubtext'|trans }}</p>
  153.                             </div>
  154.                             <!--Button-->
  155.                             {# {% if countryLocal not in ['cn', 'hk'] %}
  156.                                 <a href="{{ seoUrl('frontend.save4more.home') }}">
  157.                                     <button class="homePage_promotionBanner_button button-square button-primary">
  158.                                         <div class="d-flex items-center justify-between gap-8px">
  159.                                             <div class="d-flex flex-col items-start">
  160.                                                 <span class="text-body-m">{{ 'app.home.learnMore'|trans }}</span>
  161.                                             </div>
  162.                                             <svg width="18" height="18" viewbox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
  163.                                                 <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"/>
  164.                                                 <path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
  165.                                             </svg>
  166.                                         </div>
  167.                                     </button>
  168.                                 </a>
  169.                                 {% endif %} #}
  170.                         </div>
  171.                     </div>
  172.                 {% endif %}
  173.                 <div class="homePage_promotionBanner_right d-flex flex-col mobile:flex-col-reverse">
  174.                     <!--Lucky Wheel-->
  175.                     <div class="homePage_promotionBanner_luckyWheel homePage_promotionBanner_container_items d-flex flex-1 mobile:flex-col">
  176.                         <!--Content-->
  177.                         <div class="homePage_promotionBanner_right_content d-flex flex-col gap-1.5rem">
  178.                             <!--Text-->
  179.                             <div class="d-flex flex-col gap-8px">
  180.                                 <p class="typo-head-4-b">{{ 'app.home.promotion.earnCreditLuckyWheel'|trans }}</p>
  181.                                 <div>
  182.                                     <p class="homePage_promotionBanner_subtext typo-sub-text-2">{{ 'app.home.promotion.earnCreditLuckyWheelSubtext'|trans }}</p>
  183.                                     {# <ul class="homePage_promotionBanner_subtext" style="padding: 0;">
  184.                                             <li class="typo-sub-text-2">-{{ 'app.home.promotion.earnCreditLuckyWheelSubtitle'|trans }}</li>
  185.                                             <li class="typo-sub-text-2">-{{ 'app.home.promotion.earnCreditLuckyWheelSubtitle2'|trans }}</li>
  186.                                             <li class="typo-sub-text-2">-{{ 'app.home.promotion.earnCreditLuckyWheelSubtitle3'|trans }}</li>
  187.                                         </ul> #}
  188.                                 </div>
  189.                             </div>
  190.                             <!--Button-->
  191.                             <a href="{{ seoUrl('frontend.credit.lucky-wheel') }}">
  192.                                 <button class="homePage_promotionBanner_button button-square button-primary">
  193.                                     <div class="d-flex items-center justify-between gap-8px">
  194.                                         <div class="d-flex flex-col items-start">
  195.                                             <span class="text-body-m">{{ 'app.home.learnMore'|trans }}</span>
  196.                                         </div>
  197.                                         <svg width="18" height="18" viewbox="0 0 18 18" fill="none"
  198.                                              xmlns="http://www.w3.org/2000/svg">
  199.                                             <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"
  200.                                                   stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
  201.                                             <path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor"
  202.                                                   stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
  203.                                         </svg>
  204.                                     </div>
  205.                                 </button>
  206.                             </a>
  207.                         </div>
  208.                         <!--Image-->
  209.                         <div class="homePage_promotionBanner_right_images">
  210.                             <img class="radius-8px"
  211.                                  src-lazy="{{ asset('bundles/shopwithmeui/assets/imgs/Lucky_Wheel.jpeg') }}"
  212.                                  width="100%"/>
  213.                         </div>
  214.                     </div>
  215.                     <!--Coupon-->
  216.                     <div class="homePage_promotionBanner_coupon homePage_promotionBanner_container_items d-flex flex-1 mobile:flex-col">
  217.                         <!--Content-->
  218.                         <div class="homePage_promotionBanner_right_content d-flex flex-col gap-1.5rem ">
  219.                             <!--Text-->
  220.                             <div class="d-flex flex-col gap-8px">
  221.                                 <p class="typo-head-4-b">{{ 'app.home.promotion.get1000Credits'|trans }}</p>
  222.                                 <p class="homePage_promotionBanner_subtext typo-sub-text-2">{{ 'app.home.promotion.get1000CreditsSubtitle'|trans }}</p>
  223.                             </div>
  224.                             <!--Button-->
  225.                             <a href="{{ seoUrl('frontend.ai.stream.upload') }}">
  226.                                 <button class="homePage_promotionBanner_button button-square button-primary">
  227.                                     <div class="d-flex items-center justify-between gap-8px">
  228.                                         <div class="d-flex flex-col items-start">
  229.                                             <span class="text-body-m">{{ 'app.postVideoNow'|trans }}</span>
  230.                                         </div>
  231.                                         <svg width="18" height="18" viewbox="0 0 18 18" fill="none"
  232.                                              xmlns="http://www.w3.org/2000/svg">
  233.                                             <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"
  234.                                                   stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
  235.                                             <path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor"
  236.                                                   stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
  237.                                         </svg>
  238.                                     </div>
  239.                                 </button>
  240.                             </a>
  241.                         </div>
  242.                         <!--Images-->
  243.                         <div class="homePage_promotionBanner_right_images">
  244.                             <img class="radius-8px"
  245.                                  src-lazy="{{ asset('bundles/shopwithmeui/assets/imgs/img_money.jpeg') }}"
  246.                                  width="100%"/>
  247.                         </div>
  248.                     </div>
  249.                 </div>
  250.                 <div class="homePage_promotionBanner_shop4free homePage_promotionBanner_container_items homePage_promotionBanner_container_items-reverse d-flex flex-col">
  251.                     <!--Images-->
  252.                     <div class="homePage_promotionBanner_right_images-reverse d-flex justify-center">
  253.                         <img class="radius-8px"
  254.                              src-lazy="{{ asset('bundles/shopwithmeui/assets/imgs/home_samsungTv.png') }}"
  255.                              width="100%"/>
  256.                     </div>
  257.                     <!--Title-->
  258.                     <div class="homePage_promotionBanner_shop4free_title gap-1.5rem d-flex flex-col">
  259.                         <!--Text-->
  260.                         <div class="d-flex flex-col gap-8px">
  261.                             <p class="homePage_promotionBanner_text typo-head-4-b">{{ 'app.shop4freeUpper'|trans }}</p>
  262.                             <p class="homePage_promotionBanner_subtext typo-sub-text-3">{{ 'app.home.promotion.promotionShop4freeSubtext'|trans|raw }}</p>
  263.                         </div>
  264.                         <!--Button-->
  265.                         {% if countryLocal in ['vn'] %}
  266.                             <button class="homePage_promotionBanner_button button-square button-primary" data-toggle="modal" data-target="#featureComingSoonModal">
  267.                                 <div class="d-flex items-center justify-between gap-8px">
  268.                                     <div class="d-flex flex-col items-start">
  269.                                         <span class="text-body-m">{{ 'app.home.shop4freeNow'|trans }}</span>
  270.                                     </div>
  271.                                     <svg width="18" height="18" viewbox="0 0 18 18" fill="none"
  272.                                          xmlns="http://www.w3.org/2000/svg">
  273.                                         <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"
  274.                                               stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
  275.                                         <path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor" stroke-width="1.5"
  276.                                               stroke-linecap="round" stroke-linejoin="round"/>
  277.                                     </svg>
  278.                                 </div>
  279.                             </button>
  280.                         {% else %}
  281.                             <a href="{{ seoUrl('frontend.shop4free') }}">
  282.                                 <button class="homePage_promotionBanner_button button-square button-primary">
  283.                                     <div class="d-flex items-center justify-between gap-8px">
  284.                                         <div class="d-flex flex-col items-start">
  285.                                             <span class="text-body-m">{{ 'app.home.shop4freeNow'|trans }}</span>
  286.                                         </div>
  287.                                         <svg width="18" height="18" viewbox="0 0 18 18" fill="none"
  288.                                              xmlns="http://www.w3.org/2000/svg">
  289.                                             <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"
  290.                                                   stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
  291.                                             <path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor" stroke-width="1.5"
  292.                                                   stroke-linecap="round" stroke-linejoin="round"/>
  293.                                         </svg>
  294.                                     </div>
  295.                                 </button>
  296.                             </a>
  297.                         {% endif %}
  298.                     </div>
  299.                 </div>
  300.             </div>
  301.         </section>
  302.         <section class="section-3__home__best__quality swm-m-auto">
  303.             <div id="desktop_section-3__home__best__quality-header" class="section-3__home__best__quality-header">
  304.                 <div class="typo-head-2 d-flex items-end section-3__home__best__quality-header-text">
  305.                     {{ 'app.home.getBestHappy'|trans }} <img
  306.                             src="{{ asset('bundles/shopwithmeui/assets/icons/quality-header-icon.svg') }}"
  307.                             class="item_best_quality_img_icon section-3__home__best__quality-header-icon width-full height-full"
  308.                             style="width: 45px; height: 45px; margin-left: 4px">
  309.                 </div>
  310.                 <span class="typo-sub-text-2">{{ 'app.home.getBestHappyTitle'|trans }}</span>
  311.             </div>
  312.             <div class="section-3__home__best__quality-content swm-mt-8">
  313.                 {% set categoriesMap = {
  314.                     'all': { 'title': 'app.home.allProducts', 'savings': '78%', 'time': 'app.home.limitedTime' },
  315.                     '5bf8d9999ab24a84930e7bf07d7d4a6e': { 'title': 'app.home.rejuvenateAndBeYouthful', 'savings': '84%', 'time': 'app.home.limitedTime' },
  316.                     'a8b823eae895400cb33b767d41502dd4': { 'title': 'app.home.relaxWithWellness', 'savings': '74%', 'time': 'app.home.limitedTime' },
  317.                     'defe75e13ae7497d84edc460491818c6': { 'title': 'app.home.haveAFitterBody', 'savings': '78%', 'time': 'app.home.limitedTime' },
  318.                     'a3e978d399ad4e56bf9eab1e896dd6fe': { 'title': 'app.home.improveHealth', 'savings': '74%', 'time': 'app.home.limitedTime' },
  319.                     '4b9877842d644023a899643e1cd8548f': { 'title': 'app.home.redeemProductsForFREE', 'savings': 'app.home.creditExchange', 'time': 'app.home.greatProducts' },
  320.                     '4c4d1ba950094b3a959fce443c65557d': { 'title': 'app.home.hiTechLiving', 'savings': '85%', 'time': 'app.home.limitedTime' }
  321.                 } %}
  322.                 {% for index, category in categories %}
  323.                     {% set categoryId = category.id|trim %}
  324.                     {% set data = categoriesMap[categoryId] ?? null %}
  325.                     {% if countryLocal in ['vn'] and category.name|upper == 'SHOP4FREE' %}
  326.                         {% continue %}
  327.                     {% endif %}
  328.                     <div class="section-3__home__best__quality-content-item section-3__home__best__quality-content-item-{{ index }} border-radius-1 position-relative overflow-hidden"
  329.                          id="category-item-{{ index }}" data-id="{{ category.id }}"
  330.                          data-seoUrlShop4free="{{ seoUrl('frontend.shop4free') }}">
  331.                         <div class="section-3__home__best__quality-content-item-container  position-absolute d-flex justify-between flex-col">
  332.                             <div class="section-3__home__best__quality-content-item-tag border-radius-3 d-flex items-center justify-start">
  333.                                 <img src="{{ asset('bundles/shopwithmeui/assets/icons/category-' ~ category.id ~ '-icon.svg') }}"
  334.                                      class="item_best_quality_img_icon">
  335.                                 <span class="section-3__home__best__quality-content-item-tag-name typo-sub-text-4-smb">{{ category.name }}</span>
  336.                             </div>
  337.                         </div>
  338.                         <img src-lazy="{{ asset('bundles/shopwithmeui/assets/imgs/bestQuality/category-' ~ category.id ~ '.jpeg') }}"
  339.                              class="section-3__home__best__quality-content-item-img item_best_quality_img">
  340.                         <div class="section-3__home__best__quality-content-item-overlay position-absolute"></div>
  341.                         {% if data %}
  342.                             <div class="quality-content-infomation">
  343.                                 <div class="quality-content-infomation-head text-heading-5-m">{{ data.title|trans }}</div>
  344.                                 <div class="quality-content-infomation-title">
  345.                                     <div class="quality-content-infomation-title-savings text-body-m">{{ data.savings|trans }}
  346.                                         {% if categoryId != '4b9877842d644023a899643e1cd8548f' %}
  347.                                             {{ 'app.savings'|trans }}
  348.                                         {% endif %}
  349.                                     </div>
  350.                                     <div class="quality-content-infomation-title-time text-body-r">
  351.                                         <div class="quality-content-infomation-title-time-dot"></div> {{ data.time|trans }}
  352.                                     </div>
  353.                                 </div>
  354.                             </div>
  355.                         {% endif %}
  356.                     </div>
  357.                 {% endfor %}
  358.             </div>
  359.         </section>
  360.         <section id="home-list-products">
  361.             {% for index, category in categories %}
  362.             <div id="category-product-list-{{ category.id }}" class="homePage_productList_container d-none">
  363.                 {% if category.products && category.products %}
  364.                 {% for product in category.products %}
  365.                 {% set subscriptionProduct = product.customFields.isBuyProductSubscription ?? false %}
  366.                 {% set imageSave4moreConfig = product.customFields.mediaList.productSave4more ?: product.cover.media %}
  367.                 {% set imageProduct = subscriptionProduct ? imageSave4moreConfig : product.cover.media %}
  368.                 <!--Container-->
  369.                 <div class="mb-5 swm-m-auto d-flex flex-col items-center" style="gap: 34px;">
  370.                     <!--Product Infos-->
  371.                     <div class="homePage_productList_product_container d-flex flex-col items-center gap-1.5rem">
  372.                         <!--Certi-->
  373.                         <div class="d-flex gap-1rem justify-center" style="flex-wrap: wrap">
  374.                             {% if product.customFields.productTags is not null and product.customFields.productTags|length > 0 %}
  375.                                 {% for productTag in product.customFields.productTags %}
  376.                                     <button class="swm-btn swm-btn-certificate">{{ productTag.name }}</button>
  377.                                 {% endfor %}
  378.                             {% else %}
  379.                                 <button class="swm-btn swm-btn-certificate">{{ category.name }}</button>
  380.                             {% endif %}
  381.                             {# <button class="swm-btn swm-btn-certificate"><img src="{{ asset('bundles/shopwithmeui/assets/icons/certi_check.svg') }}"/>2 Year Warranty</button>
  382.                                         <button class="swm-btn swm-btn-certificate">Pro Sonic Technology</button> #}
  383.                         </div>
  384.                         <!--Infos-->
  385.                         <div class="homePage_productList_title_container d-flex flex-col items-center gap-1rem">
  386.                             <p class="login__title__title text-center"
  387.                                style="max-width: 608px">{{ product.translated.name }}</p>
  388.                             {% autoescape false %}
  389.                                 {% set description = (product.translated.customFields.summary ?: product.translated.description)|striptags|raw %}
  390.                                 <p class="homePage_productList_subtext typo-sub-text-2 text-center"
  391.                                    style="max-width: 620px;">
  392.                                     {{ description|length > 280 ? description|slice(0, 280) ~ '...' : description|raw }}
  393.                                 </p>
  394.                             {% endautoescape %}
  395.                         </div>
  396.                         <!--Countdown-->
  397.                         <div class="homePage_productList_countdown_container d-flex flex-col items-center gap-1.5rem">
  398.                             <div class="homePage_productList_countdown-saving d-flex items-center">
  399.                                 {% if product.extensions.currentDeal.discountRate is not null %}
  400.                                     <p class="homePage_productList_sale typo-head-4-b text-center">{{ 'app.home.listing.save'|trans }} {{ product.extensions.currentDeal.discountRate }}
  401.                                         % {{ 'app.home.listing.now'|trans }}</p>
  402.                                 {% endif %}
  403.                                 <div class="homePage_productList_cao_dao d-flex gap-1rem items-center">
  404.                                     <div class="d-flex" style="gap: 4px;">
  405.                                         <img src="{{ asset('bundles/shopwithmeui/assets/icons/lighting-circle.svg') }}"
  406.                                              class="icon-svg-lighting-circle"/>
  407.                                         <span class="homePage_productList_cao_dao_text">{{ 'app.home.listing.timeLeft'|trans }}</span>
  408.                                     </div>
  409.                                     {# <div class="homePage_productList_cao_dao_time d-flex items-center">
  410.                                                     <div class="homePage_productList_cao_dao_time_box">09d</div>
  411.                                                     <span>:</span>
  412.                                                     <div class="homePage_productList_cao_dao_time_box">09h</div>
  413.                                                     <span>:</span>
  414.                                                     <div class="homePage_productList_cao_dao_time_box">23m</div>
  415.                                                     <span>:</span>
  416.                                                     <div class="homePage_productList_cao_dao_time_box">56s</div>
  417.                                                 </div> #}
  418.                                     <div class="deals-expiration-timer homePage_productList_cao_dao_time d-flex items-center"
  419.                                          data-expired-text="{{ 'app.expired'|trans|sw_sanitize }}"
  420.                                          data-expired-time="{{ product.extensions.currentDeal.endDate|date("U") }}"></div>
  421.                                 </div>
  422.                             </div>
  423.                             <div class="d-flex items-center gap-1.5rem">
  424.                                 <a href="{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}"
  425.                                    class="text-center">
  426.                                     <button class="homePage_promotionBanner_button button-square button-primary swm-m-auto">
  427.                                         <div class="d-flex items-center justify-between gap-8px">
  428.                                             <div class="d-flex flex-col items-start">
  429.                                                 <span class="text-body-m">{{ 'app.home.learnMore'|trans }}</span>
  430.                                             </div>
  431.                                             <svg width="18" height="18" viewbox="0 0 18 18" fill="none"
  432.                                                  xmlns="http://www.w3.org/2000/svg">
  433.                                                 <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"
  434.                                                       stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
  435.                                                 <path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor"
  436.                                                       stroke-width="1.5" stroke-linecap="round"
  437.                                                       stroke-linejoin="round"/>
  438.                                             </svg>
  439.                                         </div>
  440.                                     </button>
  441.                                 </a>
  442.                                 {% if subscriptionProduct %}
  443.                                     <a href="{{ seoUrl('frontend.detail.page', {'productId': product.id, '_query': { 'subscription': '1' }}) }}"
  444.                                        class="text-center">
  445.                                         <button class="homePage_promotionBanner_button homePage_promotionBanner_button-subscription button-square button-primary swm-m-auto">
  446.                                             <div class="d-flex items-center justify-between gap-8px">
  447.                                                 <div class="d-flex flex-col items-start">
  448.                                                     <span class="text-body-m">{{ 'app.subscriptionPage.emptyPages.joinSave4moreNow'|trans|sw_sanitize }}</span>
  449.                                                 </div>
  450.                                                 <svg width="18" height="18" viewbox="0 0 18 18" fill="none"
  451.                                                      xmlns="http://www.w3.org/2000/svg">
  452.                                                     <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"
  453.                                                           stroke="currentColor" stroke-width="1.5"
  454.                                                           stroke-linecap="round"/>
  455.                                                     <path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor"
  456.                                                           stroke-width="1.5" stroke-linecap="round"
  457.                                                           stroke-linejoin="round"/>
  458.                                                 </svg>
  459.                                             </div>
  460.                                         </button>
  461.                                     </a>
  462.                                 {% endif %}
  463.                             </div>
  464.                         </div>
  465.                     </div>
  466.                     <!--Images-->
  467.                     <div class="homePage_productList_container-info-img-box width-full"
  468.                          style="max-width: 1240px; max-height: 600px">
  469.                         {% if imageProduct.mimeType starts with 'video' %}
  470.                             <video class="width-full homePage_productList_container-info-img" autoplay playsinline muted
  471.                                    video-lazy-load style="max-height: 600px; border-radius: 20px; object-fit: contain;">
  472.                                 <source data-src="{{ imageProduct.url }}" type="{{ imageProduct.mimeType }}"/>
  473.                             </video>
  474.                         {% else %}
  475.                             <img class="width-full homePage_productList_container-info-img"
  476.                                  style="object-fit: cover;max-height: 600px; border-radius: 20px; object-fit: contain"
  477.                                  src-lazy="{{ imageProduct.url }}">
  478.                         {% endif %}
  479.                     </div>
  480.                 </div>
  481.                 {% endfor %}
  482.                 {% endif %}
  483.             </div>
  484.             {% endfor %}
  485.         </section>
  486.         <section class="section-5__home__experience swm-m-auto overflow-hidden swm-mb-8"
  487.                  data-video-list-plugin="true"
  488.                  data-path="{{ path('frontend.data-stream') }}"
  489.                  data-csrf="{{ sw_csrf('frontend.data-stream', {'mode': 'token'}) }}">
  490.             <div class="section-5__home__experience-header typo-head-2">
  491.                 {{ 'app.home.experienceItYourSelf'|trans }}
  492.             </div>
  493.             <div class="section-5__home__experience-container d-flex items-center justify-start">
  494.             </div>
  495.             {#                <div class="section-5__home__experience-container_mobile d-flex items-center justify-start"> #}
  496.             {#                    {% if dataStream|first %} #}
  497.             {#                        {% set video = null %} #}
  498.             {#                        {% if dataStream|first.postChildren.elements && dataStream|first.postChildren.elements|first %}    #}
  499.             {#                            {% set video = dataStream|first.postChildren.elements|first.file.fileUrl %} #}
  500.             {#                        {% endif %} #}
  501.             {#                    <div class="section-5__home__experience-container-item border-radius-1 position-relative overflow-hidden"> #}
  502.             {#                        <div id="home_aiStream_play" class="section-5__home__experience-container-item-content  position-absolute d-flex justify-between flex-col"> #}
  503.             {#                            <div class="section-5__home__experience-container-item-tag d-flex items-center justify-start"> #}
  504.             {#                                <img src="/bundles/shopwithmetheme/assets/icons/mage_video.svg" class="item_experience_img_icon"> #}
  505.             {#                                <span class="section-5__home__experience-container-item-tag-name typo-sub-text-4-smb">Consumer #}
  506.             {#                                    Electronics</span> #}
  507.             {#                            </div> #}
  508.             {#                            <div class="section-5__home__experience_container_mobile_navigation position-absolute d-flex flex-col"> #}
  509.             {#                                <div class="d-flex gap-1rem flex-col section-5__home__experience_container_mobile_navigation_actions"> #}
  510.             {#                                    <div class="section-5__home__experience_container_mobile_navigation_action d-flex flex-col items-center"> #}
  511.             {#                                        <img class="section-5__home__experience_container_mobile_navigation_action_img" src="{{ asset('bundles/shopwithmetheme/assets/imgs/aiStream_heart.svg') }}"/> #}
  512.             {#                                        <span class="typo-sub-text-4 section-5__home__experience_container_mobile_navigation_info">{{dataStream|first.likeCount}}</span> #}
  513.             {#                                    </div> #}
  514.             {#                                    <div class="section-5__home__experience_container_mobile_navigation_action d-flex flex-col items-center"> #}
  515.             {#                                        <img class="section-5__home__experience_container_mobile_navigation_action_img" src="{{ asset('bundles/shopwithmetheme/assets/imgs/aiStream_edit.svg') }}"/> #}
  516.             {#                                        <span class="typo-sub-text-4 section-5__home__experience_container_mobile_navigation_info">Edit</span> #}
  517.             {#                                    </div> #}
  518.             {#                                    <div class="section-5__home__experience_container_mobile_navigation_action d-flex flex-col items-center"> #}
  519.             {#                                        <img class="section-5__home__experience_container_mobile_navigation_action_img" src="{{ asset('bundles/shopwithmetheme/assets/imgs/aiStream_cart.svg') }}"/> #}
  520.             {#                                    </div> #}
  521.             {#                                </div> #}
  522.             {#                                <div class=" gap-8px d-flex flex-col"> #}
  523.             {#                                    <img src="/bundles/shopwithmetheme/assets/imgs/aiStream_navUp.svg"/> #}
  524.             {#                                    <img src="/bundles/shopwithmetheme/assets/imgs/aiStream_navDown.svg"/> #}
  525.             {#                                </div> #}
  526.             {#                            </div> #}
  527.             {#                            <div class="section-5__home__experience_container_mobile_video_infor d-flex flex-col"> #}
  528.             {#                                <div class="section-5__home__experience_container_video_infor_user_info d-flex items-center"> #}
  529.             {#                                    <img class="section-5__home__experience_container_video_avatar_image" src="{{ asset('bundles/shopwithmeui/assets/imgs/shop_with_me.svg') }}"/> #}
  530.             {#                                    <span class="section-5__home__experience_container_username typo-sub-text-4">{{dataStream|first.postUser}}</span> #}
  531.             {#                                </div> #}
  532.             {#                                <div class="section-5__home__experience_container_video_infor d-flex flex-col gap-8px"> #}
  533.             {#                                    <span class="section-5__home__experience_container_video_infor_product_name">{{dataStream|first.product.translated.name}}</span> #}
  534.             {#                                    <div id="userScore" class="section-5__home__experience_container_mobile_video_infor_truncate-text-container d-flex"> #}
  535.             {#                                        <span class="typo-sub-text-5-smb section-5__home__experience_container_video_infor_user_review truncate-text truncated"> #}
  536.             {#                                            {{dataStream|first.product.translated.description|raw}} #}
  537.             {#                                        </span> #}
  538.             {#                                        <span class="typo-sub-text-5-smb show-more-btn">more</span> #}
  539.             {#                                    </div> #}
  540.             {#                                </div> #}
  541.             {#                            </div> #}
  542.             {#                            <div  class="section-5__home__experience_container_mobile_video_pause_button position-absolute"> #}
  543.             {#                                <img id="home_aiStream_play_button" src="{{ asset('bundles/shopwithmetheme/assets/imgs/aiStream_play.svg') }}"/> #}
  544.             {#                            </div> #}
  545.             {#                        </div> #}
  546.             {#                        <video id="home_aiStream_vid" class="section-5__home__experience-container-item-img item_experience_img width-full" muted playsinline loop> #}
  547.             {#                            <source src="{{video}}" type="video/mp4" /> #}
  548.             {#                        </video> #}
  549.             {#                        <div class="section-5__home__experience-container-item-overlay position-absolute"></div> #}
  550.             {#                    </div> #}
  551.             {#                {% endif %} #}
  552.             {#                </div> #}
  553.         </section>
  554.         <section
  555.                 class="homePage_how_wrapper">
  556.             <!--Container-->
  557.             <div
  558.                     class="homePage_how_container d-flex flex-col items-center swm-m-auto">
  559.                 <!--Title-->
  560.                 <div class="homePage_how_container_title d-flex flex-col items-center">
  561.                     <p class="homePage_how_container_title_title typo-head-2">{{ 'app.home.howToShop4free.howToShop4freeTitle'|trans }}</p>
  562.                     <p class="homePage_how_container_title_des typo-sub-text-2">{{ 'app.home.howToShop4free.howToShop4freeSubTitle'|trans }}</p>
  563.                 </div>
  564.                 <!--Contents-->
  565.                 <div
  566.                         class="d-flex mobile:flex-col" style="gap: 27px;">
  567.                     <!--Content-->
  568.                     <div
  569.                             class="homePage_how_content border-radius-5 gap-1.5rem d-flex flex-col items-center">
  570.                         <!--Icon-->
  571.                         <div>
  572.                             <img src="{{ asset('bundles/shopwithmeui/assets/icons/home_spinner.svg') }}"/>
  573.                         </div>
  574.                         <!--Text-->
  575.                         <div class="homePage_how_content_text items-center d-flex flex-col text-center">
  576.                             <p class="homePage_how_content_text_title text-heading-3-m">{{ 'app.home.howToShop4free.howToItems.luckyWheel.title'|trans|raw }}</p>
  577.                             <p class="homePage_how_content_text_des typo-sub-text-2">{{ 'app.home.howToShop4free.howToItems.luckyWheel.description'|trans|raw }}</p>
  578.                         </div>
  579.                         <!--Button-->
  580.                         <button class="d-none homePage_how_content_button swm-btn swm-btn-learnMore-white swm-m-auto">
  581.                             <div class="d-flex items-center justify-between gap-8px">
  582.                                 <div class="d-flex flex-col items-start">
  583.                                     <span class="homePage_how_content_button_text text-body-m">{{ 'app.home.learnMore'|trans }}</span>
  584.                                 </div>
  585.                                 <svg width="18" height="18" viewbox="0 0 18 18" fill="none"
  586.                                      xmlns="http://www.w3.org/2000/svg">
  587.                                     <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"
  588.                                           stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
  589.                                     <path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor" stroke-width="1.5"
  590.                                           stroke-linecap="round" stroke-linejoin="round"/>
  591.                                 </svg>
  592.                             </div>
  593.                         </button>
  594.                     </div>
  595.                     <div
  596.                             class="homePage_how_content border-radius-5 gap-1.5rem d-flex flex-col items-center">
  597.                         <!--Icon-->
  598.                         <div>
  599.                             <img src="{{ asset('bundles/shopwithmeui/assets/icons/home_friends.svg') }}"/>
  600.                         </div>
  601.                         <!--Text-->
  602.                         <div class="homePage_how_content_text items-center d-flex flex-col text-center">
  603.                             <p class="homePage_how_content_text_title text-heading-3-m">{{ 'app.home.howToShop4free.howToItems.inviteFriends.title'|trans|raw }}</p>
  604.                             <p class="homePage_how_content_text_des typo-sub-text-2">{{ 'app.home.howToShop4free.howToItems.inviteFriends.description'|trans|raw }}</p>
  605.                         </div>
  606.                         <!--Button-->
  607.                         <button class="d-none homePage_how_content_button swm-btn swm-btn-learnMore-white swm-m-auto">
  608.                             <div class="d-flex items-center justify-between gap-8px">
  609.                                 <div class="d-flex flex-col items-start">
  610.                                     <span class="homePage_how_content_button_text text-body-m">{{ 'app.home.learnMore'|trans }}</span>
  611.                                 </div>
  612.                                 <svg width="18" height="18" viewbox="0 0 18 18" fill="none"
  613.                                      xmlns="http://www.w3.org/2000/svg">
  614.                                     <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"
  615.                                           stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
  616.                                     <path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor" stroke-width="1.5"
  617.                                           stroke-linecap="round" stroke-linejoin="round"/>
  618.                                 </svg>
  619.                             </div>
  620.                         </button>
  621.                     </div>
  622.                     <div
  623.                             class="homePage_how_content border-radius-5 gap-1.5rem d-flex flex-col items-center">
  624.                         <!--Icon-->
  625.                         <div>
  626.                             <img src="{{ asset('bundles/shopwithmeui/assets/icons/home_cart.svg') }}"/>
  627.                         </div>
  628.                         <!--Text-->
  629.                         <div class="homePage_how_content_text items-center d-flex flex-col text-center">
  630.                             <p class="homePage_how_content_text_title text-heading-3-m">{{ 'app.home.howToShop4free.howToItems.addBasket.title'|trans|raw }}</p>
  631.                             <p class="homePage_how_content_text_des typo-sub-text-2">{{ 'app.home.howToShop4free.howToItems.addBasket.description'|trans|raw }}</p>
  632.                         </div>
  633.                         <!--Button-->
  634.                         <button class="d-none homePage_how_content_button swm-btn swm-btn-learnMore-white swm-m-auto">
  635.                             <div class="d-flex items-center justify-between gap-8px">
  636.                                 <div class="d-flex flex-col items-start">
  637.                                     <span class="homePage_how_content_button_text text-body-m">{{ 'app.home.learnMore'|trans }}</span>
  638.                                 </div>
  639.                                 <svg width="18" height="18" viewbox="0 0 18 18" fill="none"
  640.                                      xmlns="http://www.w3.org/2000/svg">
  641.                                     <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"
  642.                                           stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
  643.                                     <path d="M1 9H11M11 9L8 6M11 9L8 12" stroke="currentColor" stroke-width="1.5"
  644.                                           stroke-linecap="round" stroke-linejoin="round"/>
  645.                                 </svg>
  646.                             </div>
  647.                         </button>
  648.                     </div>
  649.                 </div>
  650.             </div>
  651.         </section>
  652.     </div>
  653.     {% if countryLocal in ['vn'] %}
  654.         <!--Feature Coming Soon Modal-->
  655.         <div class="modal fade" id="featureComingSoonModal" tabindex="-1" role="dialog" aria-hidden="true">
  656.             <div class="modal-dialog modal-dialog-centered" role="document">
  657.                 <div class="modal-content feature-coming-soon-modal">
  658.                     <button type="button" class="feature-coming-soon-modal__close" data-dismiss="modal" aria-label="Close">
  659.                         <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  660.                             <path d="M12 4L4 12M4 4L12 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
  661.                         </svg>
  662.                     </button>
  663.                     <p class="feature-coming-soon-modal__text typo-head-4-b">{{ 'app.featureAvailableSoon'|trans }}</p>
  664.                 </div>
  665.             </div>
  666.         </div>
  667.     {% endif %}
  668. </div>
  669. <script>
  670.     var translation = {
  671.         ...(translation || {}),
  672.         more: "{{ 'app.aiStreamPage.more'|trans|sw_sanitize }}",
  673.         less: "{{ 'app.aiStreamPage.less'|trans|sw_sanitize }}"
  674.     }
  675.     const translationsProductDetail = {
  676.         expired: "{{ 'app.expired'|trans|sw_sanitize }}",
  677.     };
  678. </script>
  679. {% endblock %}