{% set cur_product = fn('wc_get_product', product.id) %} {% set attrs = post.product.get_attributes() %} {% set cur_weight = function('get_product_info', post.id, 'weight') %}
{% if post.date('Y-m-d') >= criteria_for_new_product %} {{ function('pll_e', 'Новинка') }} {% endif %} {% if post._sale_price %} {{ function('pll_e', 'Распродажа %') }} {% endif %}
{{ post.title }}
{% set compound = fn('wc_get_product_terms', post.id, 'pa_compound') %} {% for option in compound %} {% set term = get_term(option) %} {{ term.name }} {% endfor %}
{{ post.title }}

{{ post._price() }}

{{ post.title }}
    {% set features = fn('wc_get_product_terms', post.id, 'pa_features') %} {% for option in features %} {% set term = get_term(option) %}
  • {{ term.name }}
  • {% endfor %}

Объем

    {% set collection = fn('wc_get_product_terms', post.id, 'pa_collection') %} {% for option in collection %} {% set term = get_term(option) %} {% set siblings = function('get_collection_siblings' , term.id) %} {% for sibling in siblings %} {% set weight = function('get_product_info', sibling.ID, 'weight') %} {% set class = '' %} {% if weight == cur_weight %} {% set class = 'active' %} {% endif %}
  • {% endfor %} {% endfor %}

Количество

{{ post._price() }}

{{ function('get_add_to_cart_button', post.id) }}