diff --git a/wp-content/themes/cosmopet/templates/_blocks/shop/archive-product-tease.twig b/wp-content/themes/cosmopet/templates/_blocks/shop/archive-product-tease.twig index 8bb76ab..6ec9d5e 100644 --- a/wp-content/themes/cosmopet/templates/_blocks/shop/archive-product-tease.twig +++ b/wp-content/themes/cosmopet/templates/_blocks/shop/archive-product-tease.twig @@ -33,11 +33,18 @@

{{ post._price() }} {{ fn('get_woocommerce_currency_symbol') }}

+ {% set stock_status = post.meta('_stock_status') == 'instock' %} + {% if stock_status == 'instock' %}
+ {% else %} + + {% endif %}
@@ -69,18 +76,22 @@ {% 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' %} + + {% set s_product = TimberPost(sibling.ID) %} + {% set s_in_stock = s_product.meta('_stock_status') == 'instock' %} + {% if s_in_stock %} + {% set class = '' %} + {% if weight == cur_weight %} + {% set class = 'active' %} + {% endif %} +
  • + +
  • {% endif %} -
  • - -
  • {% endfor %} {% endfor %} diff --git a/wp-content/themes/cosmopet/templates/archive-product/archive-product-tease.twig b/wp-content/themes/cosmopet/templates/archive-product/archive-product-tease.twig index 8bb76ab..ec52d75 100644 --- a/wp-content/themes/cosmopet/templates/archive-product/archive-product-tease.twig +++ b/wp-content/themes/cosmopet/templates/archive-product/archive-product-tease.twig @@ -33,11 +33,18 @@

    {{ post._price() }} {{ fn('get_woocommerce_currency_symbol') }}

    + {% set stock_status = fn('wc_get_product_stock_status', post.id) %} + {% if stock_status == 'instock' %}
    + {% else %} + + {% endif %}
    diff --git a/wp-content/themes/cosmopet/woocommerce/assets/css/gp-style-core.css b/wp-content/themes/cosmopet/woocommerce/assets/css/gp-style-core.css index cec068e..67b618b 100644 --- a/wp-content/themes/cosmopet/woocommerce/assets/css/gp-style-core.css +++ b/wp-content/themes/cosmopet/woocommerce/assets/css/gp-style-core.css @@ -1266,4 +1266,41 @@ button{ .wpfFilterWrapper ul:not(.wpfButtonsFilter) li{ min-width: 50%; -} \ No newline at end of file +} + + + + + + .to-know{ + width: 100%; + + padding: 12px; + + display: flex; + justify-content: center; + + border: none; + + transition: opacity .2s ease-out; + text-transform: uppercase; + } + .to-know:hover{ + opacity: .8; + } + .to-know p{ + padding-bottom: 4px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 20px; + line-height: 120%; + color: var(--text-black); + + border-bottom: 1px var(--text-black) solid; + + cursor: pointer; + } + .to-know--background-none{ + background: none; + } \ No newline at end of file