|
|
|
@ -1,12 +1,9 @@ |
|
|
|
|
{% set current_path = template_path ~ '/modules/shop/components/single-product' %} |
|
|
|
|
{% set bodyClass = 'bg-white' %} |
|
|
|
|
{% set mainClass = 'wrapper' %} |
|
|
|
|
{% extends 'layout.twig' %} |
|
|
|
|
|
|
|
|
|
{% set bodyClass = 'bg-white' %} |
|
|
|
|
|
|
|
|
|
{% set mainClass = 'wrapper' %} |
|
|
|
|
|
|
|
|
|
{% extends 'layout.twig' %} |
|
|
|
|
|
|
|
|
|
{% block content %} |
|
|
|
|
{% block content %} |
|
|
|
|
<div class="wrapper"> |
|
|
|
|
<div class="breadcrumbs"> |
|
|
|
|
{% if wc_breadcrumbs %} |
|
|
|
@ -33,7 +30,16 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="detail__content"> |
|
|
|
|
|
|
|
|
|
{# Start | Теги = категории #} |
|
|
|
|
<div class="detail__label"> |
|
|
|
|
<div class="detail__label-wrap"> |
|
|
|
|
{% for tag in product_tags %} |
|
|
|
|
<div class="product-item-label__tag product-item-label__tag--black"> |
|
|
|
|
{{ tag }} |
|
|
|
|
</div> |
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
{% if product_attributes.Flavor is defined and product_attributes.Flavor|length > 0 %} |
|
|
|
|
<div class="product-item-label__tag product-item-label__tag--black"> |
|
|
|
|
{{ product_attributes.Flavor[0].name }} |
|
|
|
@ -50,12 +56,15 @@ |
|
|
|
|
<a href="{{ product_attributes.Тег[0].link }}">{{ product_attributes.Тег[0].name }}</a> |
|
|
|
|
</div> |
|
|
|
|
{% endif %} |
|
|
|
|
{% if product.is_on_sale() %} |
|
|
|
|
{% if is_subscription %} |
|
|
|
|
<div class="product-item-label__tag product-item-label__tag--sale"> |
|
|
|
|
{{ function('pll_e', 'Распродажа %') }} |
|
|
|
|
</div> |
|
|
|
|
{% endif %} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{# End | Теги = категории #} |
|
|
|
|
|
|
|
|
|
<h1 class="detail__title"> |
|
|
|
|
{{ product.get_title }} |
|
|
|
|
</h1> |
|
|
|
@ -73,12 +82,11 @@ |
|
|
|
|
<div class="swiper-pagination"></div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
{# Start | Цена для неподписочного товара #} |
|
|
|
|
{% if product.get_price %} |
|
|
|
|
<div class="detail__block-price"> |
|
|
|
|
<p class="detail-block-price__price"> |
|
|
|
|
{{ product.get_price }} {{ fn('get_woocommerce_currency_symbol') }} |
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
{% if product.is_on_sale() %} |
|
|
|
|
{% if is_subscription %} |
|
|
|
|
{% if product.get_regular_price %} |
|
|
|
|
<div class="detail-block-price__sale"> |
|
|
|
|
<p class="detail-block-price-sale__text"> |
|
|
|
|
{{ product.get_regular_price }} {{ fn('get_woocommerce_currency_symbol') }} |
|
|
|
@ -87,8 +95,19 @@ |
|
|
|
|
{{ ((product.get_regular_price - product.get_price) / product.get_regular_price * 100)|round }} |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
{% else %} |
|
|
|
|
не задана цена по подписке |
|
|
|
|
{% endif %} |
|
|
|
|
{% else %} |
|
|
|
|
<p class="detail-block-price__price"> |
|
|
|
|
{{ product.get_price }} {{ fn('get_woocommerce_currency_symbol') }} |
|
|
|
|
</p> |
|
|
|
|
{% endif %} |
|
|
|
|
</div> |
|
|
|
|
{% endif %} |
|
|
|
|
{# End | Цена для неподписочного товара #} |
|
|
|
|
|
|
|
|
|
{# Start | Кнопка добавить в корзину + варинанты подписки на товар #} |
|
|
|
|
<form action="" class="detail-block__form" data-product-id="{{ product.id }}"> |
|
|
|
|
{% set collection = fn('wc_get_product_terms', product.id, 'pa_collection') %} |
|
|
|
|
{% if collection %} |
|
|
|
@ -113,11 +132,14 @@ |
|
|
|
|
</div> |
|
|
|
|
{% endif %} |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</form> |
|
|
|
|
{{ function('do_action', 'woocommerce_' ~ product.get_type() ~ '_add_to_cart') }} |
|
|
|
|
{# End | Кнопка добавить в корзину + варинанты подписки на товар #} |
|
|
|
|
|
|
|
|
|
{# Start | Табы с информацией #} |
|
|
|
|
<div class="detail__toggle"> |
|
|
|
|
|
|
|
|
|
{# Start | Описание товара #} |
|
|
|
|
<div class="toggle"> |
|
|
|
|
<p class="toggle__title"> |
|
|
|
|
{{ function('pll_e', 'ОПИСАНИЕ') }} |
|
|
|
@ -130,7 +152,9 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{# End | Описание товара #} |
|
|
|
|
|
|
|
|
|
{# Start | Состав товара #} |
|
|
|
|
{% if product_meta.composition %} |
|
|
|
|
<div class="toggle"> |
|
|
|
|
<p class="toggle__title"> |
|
|
|
@ -145,7 +169,9 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{% endif %} |
|
|
|
|
{# End | Состав товара #} |
|
|
|
|
|
|
|
|
|
{# Start | Рекомендации по кормлению #} |
|
|
|
|
{% if product_meta.feeding_recommendations_table %} |
|
|
|
|
<div class="toggle"> |
|
|
|
|
<p class="toggle__title"> |
|
|
|
@ -198,6 +224,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{% endif %} |
|
|
|
|
{# End | Рекомендации по кормлению #} |
|
|
|
|
|
|
|
|
|
{% if product_meta.nutritional_value or product_meta.vitamins or product_meta.additives or product_meta.energy_value %} |
|
|
|
|
<div class="toggle"> |
|
|
|
@ -246,10 +273,8 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
{# End | Табы с информацией #} |
|
|
|
|
|
|
|
|
|
<div class="detail__warning"> |
|
|
|
|
<div class="detail-warning__content"> |
|
|
|
@ -259,7 +284,9 @@ |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="product__main"> |
|
|
|
|
{% set recommended_products = function('get_field', 'recommended_products', product.id) %} |
|
|
|
|
{% set related_products = recommended_products ? recommended_products : function('wc_get_related_products', product.id, 4) %} |
|
|
|
@ -295,7 +322,7 @@ |
|
|
|
|
</span> |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
{% if wc_product.is_on_sale() %} |
|
|
|
|
{% if is_subscription %} |
|
|
|
|
<span href="#" class="product-item-label__tag product-item-label__tag--sale"> |
|
|
|
|
{{ function('pll_e', 'Распродажа %') }} |
|
|
|
|
</span> |
|
|
|
@ -409,6 +436,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="gallery"> |
|
|
|
|
<button class="gallery__close gallery-button"> |
|
|
|
|
<img src="{{ theme.uri }}/static/shop/img/svg/main/black-x.svg" alt=""> |
|
|
|
@ -447,4 +475,4 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
{% endblock %} |
|
|
|
|
{% endblock %} |