{% from 'utils.html.twig' import moeda, ico, imgUpload %}
{% extends 'website/main.template.html.twig' %}
{% block title %}
<title>{{ "#{productPage.title} - #{client.brand}" }}</title>
<meta name="title" content="{{ "#{productPage.title} - #{client.brand}" }}">
<meta property="og:title" content="{{ "#{productPage.title} - #{client.brand}" }}">
{% endblock %}
{% block bodyTag %}
<body
id="body"
class="product-detail-body {{ productPage.showShortageControlTime ? 'page-height-top' }}"
data-theme="{{ isDarkTheme? 'dark':'light' }}"
{% if isDarkTheme %} data-hide-deco="{{ hideBgDeco? 1:0 }}"{% endif %}
data-shortagevisualizationnumber="{{ productPage.shortageVisualizationNumber }}"
data-shortagebuyersnumber="{{ productPage.shortageBuyersNumber }}"
data-shortagevacanciesnumber="{{ productPage.shortageVacanciesNumber }}"
data-shortagevisualization="{{ productPage.showShortageControlVisualization }}"
data-shortagebuyers="{{ productPage.showShortageControlBuyers }}"
data-shortagevacancies="{{ productPage.showShortageControlVacancies }}"
data-shortagestorage="{{ actualDomain }}_{{ productOffer.id }}_{{ session ? session.user.id }}">
{% endblock %}
{% block product_detail_css %}
{% include 'website/includes/css-product-detail.html.twig' %}
{% endblock %}
{% block meta %}
{% if (productPage.overview) %}
<meta name="description" content="{{ productPage.overview }}">
<meta property="og:description" content="{{ productPage.overview }}">
{% endif %}
<meta property="og:image" content="https:{{
getFilePathComplete({
fileName: (productPage.photo|length > 0)? productPage.photo : getConfig('image_default'),
pathConst: enum('AbstractEnum::PATH_PRODUCT_PHOTO'),
addUpload: enum('AbstractEnum::YES')
}).pathCdn
}}">
{% endblock %}
{% block metaIndex %}
{% if productOffer.default != enum('ProductEnum::YES') %}
<meta name="robots" content="nofollow">
{% else %}
<meta name="robots" content="index, follow">
{% endif %}
{% endblock %}
{% set productTypeText = getProductTypeTextTranslate(product.type) %}
{% set isOne = (productOffers|length > 1 or product.type != enum('ProductEnum::SUBSCRIPTION')) %}
{% set infoOffer = getInfoAccessProductOffer(productOffer, false, productCoupon, isOne) %}
{% set isInCart = productIsInCart(product.id, productOffer.id) %}
{% set canBuyNow = (infoOffer.allowBuyNow or infoOffer.isFree) %}
{% block body %}
{# FAST TIMER #}
{% include 'website/includes/fast-timer.html.twig' %}
{# SEARCH #}
{% include 'website/includes/search-section.html.twig' %}
{# BANNER #}
{% include 'website/product/product-detail-banner-section.html.twig' %}
{# LIBRARY INIT #}
<div id="wrap-video-init">
{% if productPage.library is not empty and credentials %}
{% include 'website/includes/video.html.twig' with {
url: "https://player.vdocipher.com/v2/?otp=#{ credentials.otp }&playbackInfo=#{ credentials.playbackInfo }&primaryColor=#{ getConfig('primary_color')|trim('#') }",
autoplay: productPage.autoplay,
title: product.title,
width: 353,
height: 211,
library: true,
}%}
{# VIDEO INIT #}
{% elseif productPage.video is not empty %}
{% include 'website/includes/video.html.twig' with {
url: productPage.video,
autoplay: productPage.autoplay,
title: product.title,
width: 353,
height: 211,
library: false,
}%}
{% endif %}
</div>
<div class="contem-menu-anchors">
<section class="menu-anchors" data-page-height-top="{{ productPage.showShortageControlTime ? '1':'0' }}">
<div class="container">
<nav class="lateral-products">
{% if productPage.about|length > 0 %}
<a data-link-scroll="#sec-about">{{ getLanguage('about', 'product') }}</a>
{% endif %}
{% if product.type == enum('ProductEnum::COURSE') and lessonModules|length > 0 %}
<a data-link-scroll="#sec-content">
{{ getLanguage('content', 'product') }}
</a>
{% endif %}
{% if product.type == enum('ProductEnum::SUBSCRIPTION') or product.type == enum('ProductEnum::COMBO') %}
{% if courses|length > 0 %}
<a data-link-scroll="#sec-content">
{{ getLanguage('courses', 'product') }}
</a>
{% endif %}
{% endif %}
{% if teacherSection.teachers|length > 0 %}
<a data-link-scroll="#sec-instructors">{{ getLanguage('instructors', 'product') }}</a>
{% endif %}
{% if isModuleActive('faq_module') and faqs|length > 0 %}
<a data-link-scroll="#sec-faq">FAQ</a>
{% endif %}
{% if scoreProduct.scoreTotal > 0 and productPage.showModuleTestimonials and getConfig('allow_testimonial') == enum('CourseEnum::YES') %}
<a data-link-scroll="#sec-reviews">{{ getLanguage('rates', 'product') }}</a>
{% endif %}
</nav>
</div>
</section>
</div>
<div class="container">
{# ABOUT #}
{% if productPage.about|length > 0 %}
<section id="sec-about" class="text-open lateral-products">
<h2>
{% if product.type == enum('ProductEnum::SUBSCRIPTION') %}
{{"#{getLanguage('about_the2', 'product')} #{productTypeText|capitalize}"}}
{% else %}
{{"#{getLanguage('about_the', 'product')} #{productTypeText|capitalize}"}}
{% endif %}
</h2>
<div class="wrap txt">
<div class="contem fr-view">
{{ productPage.about|raw }}
</div>
</div>
<button class="mais js--abre">
<span>{{ getLanguage('show_more', 'product') }}</span>
<span>{{ getLanguage('show_less', 'product') }}</span>
</button>
</section>
{% endif %}
{# PUBLIC #}
{% if productPage.target|length > 0 %}
<section id="sec-publico" class="text-open lateral-products">
<h2>{{ getLanguage('target_audience', 'product') }}</h2>
<div class="wrap txt">
<div class="contem fr-view">
{{ productPage.target|raw }}
</div>
</div>
<button class="mais js--abre">
<span>{{ getLanguage('show_more', 'product') }}</span>
<span>{{ getLanguage('show_less', 'product') }}</span>
</button>
</section>
{% endif %}
{# ABOUT CERTIFICATE #}
{% if productPage.aboutCertificate|length > 0 and certificate and isModuleActive('course_certificate_module') %}
<section id="sec-publico" class="text-open lateral-products">
<h2>{{ getLanguage('about_certificate', 'product') }}</h2>
<div class="wrap txt">
<div class="contem fr-view">
{{ productPage.aboutCertificate|raw }}
</div>
</div>
<button class="mais js--abre">
<span>{{ getLanguage('show_more', 'product') }}</span>
<span>{{ getLanguage('show_less', 'product') }}</span>
</button>
</section>
{% endif %}
</div>
<div class="container">
{# MATRÍCULA -- CURSO #}
{% if product.type == enum('ProductEnum::COURSE') %}
{% if lifetimePeriod == enum('CourseEnum::YES') or accessPeriod %}
<div class="lateral-products">
<div class="product-validade">
{% if lifetimePeriod == enum('CourseEnum::YES') %}
<div class="period">
<i class="fas fa-infinity"></i>
{# {{ ico('infinity') }} !!! #}
</div>
<p class="title">{{ getLanguage('no_time', 'product') }}</p>
<p class="desc">{{ getLanguage('rest_assured', 'product') }} {{ getLanguage('lifetime_period', 'product') }}</p>
{% elseif accessPeriod %}
<div class="period">{{ accessPeriod }}</div>
<p class="title">{{ getLanguage('no_time', 'product') }}</p>
<p class="desc">{{ getLanguage('rest_assured', 'product') }}
{{ getLanguage('in_until', 'product') }} {{ accessPeriod }}
{{ getLanguage('after_enrollment', 'product') }}</p>
{% endif %}
</div>
</div>
{% endif %}
{% endif %}
{# MATRÍCULA -- PLANO #}
{% if product.type == enum('ProductEnum::SUBSCRIPTION') and not userHasProduct(product) %}
<div class="lateral-products">
<div class="product-validade">
<div class="period">
<p>{{ courses|length }} <small>{{ (courses|length > 1) ? getLanguage('courses_lowercase', 'product') : getLanguage('course_lowercase', 'product') }}</small></p>
</div>
<p class="title">{{ getLanguage('subscribe_now', 'product') }}</p>
{% if productOffer.membershipFee == 0 %}
<p class="desc">{{ getLanguage('free_membership_fee', 'product') }}!</p>
{% else %}
<p class="desc">{{ " + %s #{getLanguage('membership_fee', 'product')}"|format(moeda(productOffer.membershipFee))|raw }}</p>
{% endif %}
<div class="acoes">
{% if isOne %}
<a data-link-scroll="#ofertas-planos" class="btn-matricula">{{ getLanguage('subscribe', 'product') }}</a>
{% endif %}
</div>
</div>
</div>
{% endif %}
</div>
{# CURSOS INCLUSOS #}
{% if product.type == enum('ProductEnum::SUBSCRIPTION') or product.type == enum('ProductEnum::COMBO') %}
{# @??? !!! #}
<div id="sec-content" class="inclusos">
{% include 'website/course/course-section.html.twig' with { section: planCoursesSection } %}
</div>
{% endif %}
{# CONTEÚDO #}
{% if product.type == enum('ProductEnum::COURSE') %}
<div id="sec-content">
<div class="container">
<div class="lateral-products">
{% include 'website/product/product-detail-course-content-section.html.twig' with { show: 3, open: 1 } %}
</div>
</div>
</div>
{% endif %}
{# INSTRUCTORS #}
<div id="sec-instructors">
<div class="container">
<div class="lateral-products">
{% include 'website/teacher/teacher-section.html.twig' with { layout: 'product', theme: (isDarkTheme? 'dark':'light') }%}
</div>
</div>
</div>
{# FAQ #}
{% if isModuleActive('faq_module') %}
{% include 'website/faq/faq-section.html.twig' with { layout: 'produto' } %}
{% endif %}
{# CURRENT PLAN - CYCLES #}
{% if productOffers|length > 1 and product.type == enum('ProductEnum::SUBSCRIPTION') and not userHasProduct(product) %}
<section id="ofertas-planos" class="pag-sec sec-bg-alt">
<div class="container">
<div class="lateral-products">
<header class="tit-sec tx-centro">
<h2>{{ getLanguage('offers', 'product') }} <b>{{ getLanguage('flexible', 'product') }}</b></h2>
<span class="sub">{{ getLanguage('choose_the_plan', 'product') }}</span>
</header>
{% include 'website/product/product-detail-plan-cycles-section.html.twig' with {
full: (productOffers|length < 3) ? false : true,
layout: 'product'
} %}
</div>
</div>
</section>
{% endif %}
{# VANTAGENS #}
{% if product.type == enum('ProductEnum::COURSE') %}
<div class="sec-bg-strip">
<div class="container">
<div class="lateral-products">
<div class="advantages">
{% if productOffer.warranty == 1 %}
<p>{{ ico('dollar') }}
<span>{{ getLanguage('day_warranty', 'product') }}
{{ productOffer.warrantyOption }}
{{ plural(productOffer.warrantyOption,
getLanguage('warranty_devolution_day', 'product'),
getLanguage('warranty_devolution_days', 'product')
)}}</span>
</p>
{% endif %}
{% if lifetimePeriod == 1 %}
<p><i class="fas fa-infinity"></i>
{# {{ ico('infinity') }} #}
<span>{{ getLanguage('lifetime_access', 'product') }}</span></p>
{% elseif accessPeriod %}
<p>{{ ico('calendar') }}<span>{{ getLanguage('access_by', 'product') }} {{ accessPeriod }}</span></p>
{% endif %}
{# SUPPORT #}
{% if support == enum('CourseEnum::YES') %}
{% if lifetimeSupport == 1 %}
<p><i class="fas fa-infinity"></i>
<span>{{ getLanguage('lifetime_support', 'product') }}</span></p>
{% elseif supportPeriod %}
<p>{{ ico('calendar') }}<span>{{ getLanguage('until', 'product') }} {{ supportPeriod }} {{ getLanguage('of_support', 'product') }}</span></p>
{% endif %}
{% endif %}
<p>{{ ico('coffee') }}<span>{{ getLanguage('study_whenever', 'product') }}</span></p>
{% if fileTotal > 0 %}
<p>{{ ico('smartphone') }}<span>{{ getLanguage('downloadable_materials', 'product') }}</span></p>
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{# SUGESTÃO DO UPSELL #}
{% if productOfferSuggestions is not empty and not userHasProduct(product) %}
<div class="container">
<div class="lateral-products">
{% include 'website/product/product-detail-upsell-section.html.twig' with { suggestions: productOfferSuggestions } %}
</div>
</div>
{% endif %}
{% if scoreProduct.scoreTotal > 0 and productPage.showModuleTestimonials and getConfig('allow_testimonial') == enum('CourseEnum::YES') %}
{# REVIEWS #}
{% include 'website/product/product-detail-reviews-section.html.twig' %}
{# TESTIMONIALS #}
<div class="container mobile--wid">
<div class="lateral-products">
{% include 'website/course/course-testimonial-section.html.twig' with { layout: 'produto' } %}
</div>
</div>
{% endif %}
{# RELATED PRODUCTS #}
{% if (productOffersRelatedsSection.items|length != 0) %}
<div class="container">
<div class="relacionados">
{% include 'website/product/product-section.html.twig' with { section: productOffersRelatedsSection } %}
</div>
</div>
{% endif %}
{# CURRENT COURSE - PLANS #}
{% if product.type == enum('ProductEnum::COURSE')
and productOffersSubscriptionSection.items is not empty %}
{% include 'website/product/product-plans-section.html.twig' with { layout: 'product' } %}
{% endif %}
{# BUY INFO #}
{% include 'website/product/product-detail-buy-section.html.twig' %}
{# MODAL -- WAITLIST #}
{% include 'website/includes/modal-waitlist.html.twig' with { languageKey: 'product' } %}
{# MODAL -- FAST USER REGISTER #}
{% include 'website/includes/modal-register.html.twig' with { languageKey: 'product' } %}
{# MODAL -- TERMOS DE USO #}
{% embed "website/includes/modal.html.twig" with {'id': 'modal-terms-of-use', 'title': getLanguage('ready_terms', 'register'), 'back': true } %}
{% block content %}
{{ getConfig('contract')|raw }}
{% endblock %}
{% endembed %}
{# MODAL -- COUPONS LIST #}
{% embed "website/includes/modal.html.twig" with { 'id': 'coupons-modal', 'title': getLanguage('avaliable_coupons', 'product')} %}
{% block content %}
{% from 'utils.html.twig' import ico %}
<div class="modal-coupons-content">
<div class="modal-loading">
<i class="modal-loader">{{ ico('loader-wish') }}</i> {{ getLanguage('wait', 'util') }}…
</div>
</div>
{% endblock %}
{% endembed %}
{# MODAL -- COUPON RULES #}
{% include "website/includes/modal-coupon-rules.html.twig" %}
{# MODAL -- SHARE #}
{% include "website/includes/modal-share.html.twig" with { id: 'modal-share', title: getLanguage('share', 'product') } %}
{% endblock %}