Fix | 6675 исправлен вывод переключателей в карточке товара

dev_10_refactoring
parent 98ac888fc5
commit b629e5e373
  1. 5
      wp-content/themes/cosmopet/modules/shop/components/single-product/assets/css/gp-style-core.css
  2. 10
      wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig

@ -1560,4 +1560,9 @@ input:checked + .subscription-option-details::before, input:checked + .wcsatt-op
.detail #wc-stripe-express-checkout-element{ .detail #wc-stripe-express-checkout-element{
display: none !important; display: none !important;
}
.detail-block-form__item--radio{
display: flex;
gap: 10px;
} }

@ -96,10 +96,16 @@
{% if siblings %} {% if siblings %}
<div class="detail-block-form__item detail-block-form__item--radio radio-button"> <div class="detail-block-form__item detail-block-form__item--radio radio-button">
{% for sibling in siblings %} {% for sibling in siblings %}
{% set weight = sibling.post_title|split(', ')|last %} {% set weight = function('get_product_info', sibling.ID, 'weight') %}
{% set current_weight = function('get_product_info', product.id, 'weight') %} {% set current_weight = function('get_product_info', product.id, 'weight') %}
{% set class = weight == current_weight ? 'active' : '' %} {% set class = weight == current_weight ? 'active' : '' %}
<a href="{{ function('get_permalink', sibling.ID) }}" class="button button--white button--red-48-px {{ class }}" data-product_id="{{ sibling.ID }}" data-product_price="{{ function('get_product_info', sibling.ID, 'price') }}">
<a
href="{{ function('get_permalink', sibling.ID) }}"
class="button button--white button--red-48-px {{ class }}"
data-product_id="{{ sibling.ID }}"
data-product_price="{{ function('get_product_info', sibling.ID, 'price') }}"
>
{{ weight|upper }} {{ weight|upper }}
</a> </a>
{% endfor %} {% endfor %}

Loading…
Cancel
Save