You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
319 lines
17 KiB
319 lines
17 KiB
{% set bodyClass = 'bg-white' %}
|
|
{% set mainClass = '' %}
|
|
{% extends 'layout.twig' %}
|
|
|
|
{% block content %}
|
|
<div class="product-single" data-product-id="{{ post.id }}">
|
|
<div class="wrapper">
|
|
<div class="breadcrumbs">
|
|
<a href="{{ fn('home_url') }}" class="breadcrumbs__item">
|
|
{{ fn('pll_e', 'Главная') }}
|
|
</a>
|
|
{% set product_categories = post.get_terms('product_cat') %}
|
|
{% if product_categories %}
|
|
{% set category = product_categories[0] %}
|
|
<a href="{{ category.link }}" class="breadcrumbs__item">
|
|
{{ category.name }}
|
|
</a>
|
|
{% endif %}
|
|
<a href="{{post.link}}" class="breadcrumbs__item">
|
|
{{post.title}}
|
|
</a>
|
|
</div>
|
|
<div class="product_main {{ post.getTasteClass() }}">
|
|
<div class="product-info">
|
|
<h1 class="product-title --pc">
|
|
{{post.title}}
|
|
</h1>
|
|
<div class="product-contains">
|
|
<h2 class="product-block-title">{{ fn('pll_e', 'СОСТАВ') }}</h2>
|
|
<div class="product-contains-text">{{ post.getComposition }}</div>
|
|
</div>
|
|
{% set nutritional_value = post.nutritional_value %}
|
|
{% set vitamins = post.vitamins %}
|
|
{% if nutritional_value or vitamins %}
|
|
<div class="product-values">
|
|
{% if nutritional_value %}
|
|
<h2 class="product-values-title">{{ fn('pll_e', 'ПИЩЕВАЯ ЦЕННОСТЬ') }}</h2>
|
|
<div class="product-values-list">
|
|
|
|
{% if nutritional_value.protein %}
|
|
<div class="product-values-item">
|
|
<div class="product-values-item__name">{{ fn('pll_e', 'Сырой белок') }}</div>
|
|
<div class="product-values-item-val">{{nutritional_value.protein}}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if nutritional_value.fat %}
|
|
<div class="product-values-item">
|
|
<div class="product-values-item__name">{{ fn('pll_e', 'Сырой жир') }}</div>
|
|
<div class="product-values-item-val">{{nutritional_value.fat}}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if nutritional_value.fiber %}
|
|
<div class="product-values-item">
|
|
<div class="product-values-item__name">{{ fn('pll_e', 'Сырая клетчатка') }}</div>
|
|
<div class="product-values-item-val">{{nutritional_value.fiber}}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if nutritional_value.ash %}
|
|
<div class="product-values-item">
|
|
<div class="product-values-item__name">{{ fn('pll_e', 'Сырая зола') }}</div>
|
|
<div class="product-values-item-val">{{nutritional_value.ash}}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if nutritional_value.wat %}
|
|
<div class="product-values-item">
|
|
<div class="product-values-item__name">{{ fn('pll_e', 'Влажность') }}</div>
|
|
<div class="product-values-item-val">{{nutritional_value.wat}}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if nutritional_value.calcium %}
|
|
<div class="product-values-item">
|
|
<div class="product-values-item__name">{{ fn('pll_e', 'Кальций') }}</div>
|
|
<div class="product-values-item-val">{{nutritional_value.calcium}}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if nutritional_value.phosphorus %}
|
|
<div class="product-values-item">
|
|
<div class="product-values-item__name">{{ fn('pll_e', 'Фосфор') }}</div>
|
|
<div class="product-values-item-val">{{nutritional_value.phosphorus}}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if nutritional_value.omega_6 %}
|
|
<div class="product-values-item">
|
|
<div class="product-values-item__name">{{ fn('pll_e', 'Омега 6') }}</div>
|
|
<div class="product-values-item-val">{{nutritional_value.omega_6}}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if nutritional_value.omega_3 %}
|
|
<div class="product-values-item">
|
|
<div class="product-values-item__name">{{ fn('pll_e', 'Омега 3') }}</div>
|
|
<div class="product-values-item-val">{{nutritional_value.omega_3}}</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% set vitamins = post.vitamins %}
|
|
{% if vitamins %}
|
|
<div class="product-vitamins">
|
|
<div class="product-vitamins-title">
|
|
{{ fn('pll_e', 'Витамины на кг') }}
|
|
</div>
|
|
<div class="product-vitamins-list">
|
|
|
|
{% if vitamins.vitamin_a_me %}
|
|
<div class="product-vitamins-item">A, ME — {{vitamins.vitamin_a_me}}</div>
|
|
{% endif %}
|
|
{% if vitamins.vitamin_d3_me %}
|
|
<div class="product-vitamins-item">D3, ME — {{vitamins.vitamin_d3_me}}</div>
|
|
{% endif %}
|
|
{% if vitamins.vitamin_e %}
|
|
<div class="product-vitamins-item">E — {{vitamins.vitamin_e}}</div>
|
|
{% endif %}
|
|
{% if vitamins.tiamin %}
|
|
<div class="product-vitamins-item">{{ fn('pll_e', 'Тиамин') }} — {{vitamins.tiamin}}</div>
|
|
{% endif %}
|
|
{% if vitamins.riboflavin %}
|
|
<div class="product-vitamins-item">{{ fn('pll_e', 'Рибофлавин') }} — {{vitamins.riboflavin}}</div>
|
|
{% endif %}
|
|
{% if vitamins.pantothenic_acid %}
|
|
<div class="product-vitamins-item">{{ fn('pll_e', 'Пантотеновая кислота') }} — {{vitamins.pantothenic_acid}}</div>
|
|
{% endif %}
|
|
{% if vitamins.niaczin %}
|
|
<div class="product-vitamins-item">{{ fn('pll_e', 'Ниацин') }} — {{vitamins.niaczin}}</div>
|
|
{% endif %}
|
|
{% if vitamins.piridoksin %}
|
|
<div class="product-vitamins-item">{{ fn('pll_e', 'Пиридоксин') }} — {{vitamins.piridoksin}}</div>
|
|
{% endif %}
|
|
{% if vitamins.folic_acid %}
|
|
<div class="product-vitamins-item">{{ fn('pll_e', 'Фолиевая кислота') }} — {{vitamins.folic_acid}}</div>
|
|
{% endif %}
|
|
{% if vitamins.vitamin_b12 %}
|
|
<div class="product-vitamins-item">{{ fn('pll_e', 'Витамин B12') }} — {{vitamins.vitamin_b12}}</div>
|
|
{% endif %}
|
|
{% if vitamins.holin %}
|
|
<div class="product-vitamins-item">{{ fn('pll_e', 'Холин') }} — {{vitamins.holin}}</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="product-show">
|
|
<div class="product-gallery">
|
|
<div class="swiper product-gallery__mainSlider">
|
|
<div class="swiper-wrapper">
|
|
{% set image_list = post.getImageGallery('full') %}
|
|
{% for image in image_list %}
|
|
<div class="swiper-slide">
|
|
<img src="{{ image.url }}" alt="{{image.alt}}">
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div thumbsSlider="" class="swiper product-gallery__thumbsSlider">
|
|
<div class="swiper-wrapper">
|
|
{% set image_list = post.getImageGallery('medium') %}
|
|
{% for image in image_list %}
|
|
<div class="swiper-slide">
|
|
<img src="{{ image.url }}" alt="{{image.alt}}">
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="product-gallery-arrows">
|
|
<button class="product-gallery-arrow product-gallery-prev"></button>
|
|
<button class="product-gallery-arrow product-gallery-next"></button>
|
|
</div>
|
|
</div>
|
|
<div class="product-gallery-bullets"></div>
|
|
</div>
|
|
<h1 class="product-title --m">
|
|
{{post.title}}
|
|
</h1>
|
|
</div>
|
|
<div class="product-constructor">
|
|
{% set constructor = post.getProductConstructor %}
|
|
{% for taxonomy, attribute_data in constructor %}
|
|
{% if taxonomy != 'pa_series' %}
|
|
<div class="product-constructor__block">
|
|
<div class="product-constructor__block-title">{{attribute_data.label}}</div>
|
|
<div class="product-constructor__block-list">
|
|
{% for option_id, option in attribute_data.options %}
|
|
{% set first_product = option.products[0] %}
|
|
<a href="{{first_product.link}}" class="product-constructor__block-item{% if attribute_data.current_value == option.term_id %} active{% endif %}">
|
|
{% if option.icon %}
|
|
<img src="{{option.icon}}" alt="" class="product-constructor__block-item-icon{% if attribute_data.current_value == option.term_id %} active{% endif %} svg">
|
|
{% endif %}
|
|
<div class="product-constructor__block-item-name">{{option.name}}</div>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% set size_siblings = post.getSizeSiblings %}
|
|
{% if size_siblings %}
|
|
<div class="product-constructor__block">
|
|
<div class="product-constructor__block-title">{{fn('pll_e', 'ВЕС УПАКОВКИ')}}</div>
|
|
<div class="product-constructor__block-list">
|
|
{% for sibling in size_siblings %}
|
|
<a href="{{sibling.link}}" class="product-constructor__block-item{% if post.get_weight == sibling.get_weight %} active{% endif %}">
|
|
<div class="product-constructor__block-item-name">{{sibling.get_weight}}</div>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{# Отображаем pa_series после вариантов веса #}
|
|
{% for taxonomy, attribute_data in constructor %}
|
|
{% if taxonomy == 'pa_series' %}
|
|
<div class="product-constructor__block">
|
|
<div class="product-constructor__block-title">{{attribute_data.label}}</div>
|
|
<div class="product-constructor__block-list">
|
|
{% for option_id, option in attribute_data.options %}
|
|
{% set first_product = option.products[0] %}
|
|
<a href="{{first_product.link}}" class="product-constructor__block-item{% if attribute_data.current_value == option.term_id %} active{% endif %}">
|
|
{% if option.icon %}
|
|
<img src="{{option.icon}}" alt="" class="product-constructor__block-item-icon{% if attribute_data.current_value == option.term_id %} active{% endif %} svg">
|
|
{% endif %}
|
|
<div class="product-constructor__block-item-name">{{option.name}}</div>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
<div class="product-price">
|
|
<div class="product-price-main">
|
|
{{post.getPriceWithCurrency}}
|
|
</div>
|
|
{% if post.getRegularPrice %}
|
|
<div class="product-price-disc">
|
|
<div class="product-price-old">{{post.getRegularPriceWithCurrency}}</div>
|
|
<div class="product-price-percent">
|
|
{{ post.getPriceDifferenceInPercent }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
|
|
<div id="product-buy-block-wrapper">
|
|
{% include 'blocks/modules/shop/product-single-add_to_cart.twig' %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="product-desc">
|
|
<div class="product-block-title">
|
|
{{ fn('pll_e', 'ОПИСАНИЕ') }}
|
|
</div>
|
|
<div class="product-desc-text">
|
|
{{post.content}}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% set reviews = post.getReviews %}
|
|
{% if reviews %}
|
|
<div class="product-reviews">
|
|
<div class="product-reviews__head wrapper">
|
|
<div class="product-block-title">
|
|
{{ fn('pll_e', 'Отзывы Специалистов') }}
|
|
</div>
|
|
<div class="product-block-arrows">
|
|
<button class="slider-button-prev slider-button product-reviews-prev"></button>
|
|
<button class="slider-button-next slider-button product-reviews-next"></button>
|
|
</div>
|
|
</div>
|
|
<div class="product-reviews-slider swiper">
|
|
<div class="swiper-wrapper">
|
|
{% for slide in reviews %}
|
|
{% include "shop/reviews-slide_element.twig" with {slide: slide} %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="product-block-arrows--m">
|
|
<button class="slider-button-prev slider-button product-reviews-prev"></button>
|
|
<button class="slider-button-next slider-button product-reviews-next"></button>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if post.getRelatedProducts %}
|
|
<div class="product-similar ">
|
|
<div class="product-similar__head wrapper">
|
|
<div class="product-block-title">
|
|
{{ fn('pll_e', 'вашему питомцу может понравиться') }}
|
|
</div>
|
|
<div class="product-block-arrows">
|
|
<button class="slider-button-prev slider-button product-similar-prev"></button>
|
|
<button class="slider-button-next slider-button product-similar-next"></button>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="product-similar-slider wrapper">
|
|
<div class="swiper-wrapper">
|
|
{% for related_product in post.getRelatedProducts %}
|
|
{% include 'woocommerce/product-card.twig' with {item : related_product, addClass: 'swiper-slide'} %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="product-block-arrows--m">
|
|
<button class="slider-button-prev slider-button product-similar-prev"></button>
|
|
<button class="slider-button-next slider-button product-similar-next"></button>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
{% for slide in reviews %}
|
|
|
|
{% include 'modal/rewiew_modal.twig' with {slide : slide} %}
|
|
|
|
{% endfor %}
|
|
{% endblock %} |