{% comment %} ---------------- Optional values product_recommendations: {% endcomment %} {% comment %}Check for related products and increase limit by one (to offset the currently selected product that is removed from the product loop){% endcomment %} {%- assign limit = limit | plus: 0 -%} {%- assign loop_limit = limit | plus: 1 -%} {%- assign hover_enabled = block.settings.show_related_products_title_on_hover -%} {%- assign visible_products = products_per | plus: 0 -%} {%- assign hover_enabled = settings.thumbnail_hover_enabled -%} {% liquid assign active_discount = true assign empty_array = "" | split: "" assign dormant_discounts = shop.metafields.app--168074346497.dormant_discounts.value | default: empty_array assign target_discount_id = product.metafields.app--168074346497.applied_discount_id.value for dormant_discount in dormant_discounts if dormant_discount == target_discount_id assign active_discount = false endif endfor assign product_price = product.price assign product_compare_at_price_max = product.compare_at_price_max assign product_compare_at_price = product.compare_at_price if active_discount assign product_price = product.metafields.app--168074346497.min_auto_discounted_price.value | default: product.price if product_price < product.price and product_compare_at_price == 0 or product_compare_at_price == blank assign product_compare_at_price = product.price endif if product_price < product.price and product_compare_at_price_max == 0 or product_compare_at_price_max == blank assign product_compare_at_price_max = product.price_max endif endif assign variant_price = variant.price assign variant_compare_at_price = variant.compare_at_price if active_discount assign variant_price = variant.metafields.app--168074346497.auto_discounted_price.value | default: variant.price assign variant_compare_at_price = variant.compare_at_price if shop.metafields.app--168074346497.discount_percentage.value > 0.005 assign discount_percentage = shop.metafields.app--168074346497.discount_percentage.value | times: 1.0 assign deducted_percentage = 1.0 | minus: discount_percentage assign variant_price = variant.price | divided_by: 100.0 | times: deducted_percentage | times: 100.0 | ceil endif if variant_price < variant.price and variant_compare_at_price == 0 or variant_compare_at_price == blank assign variant_compare_at_price = variant.price endif endif %} {%- if variant.product.metafields.inventory.ShappifyHidden == 'true' -%}{%- continue -%}{%- endif -%} {%- assign collection_handles = variant.product.collections | map: 'handle' -%} {% if variant.product.id != skip_product.id %}
{% if hover_enabled or settings.enable_quickshop %}
{% if hover_enabled %}
{% if settings.display_vendor %} {{ variant.product.vendor }} {% endif %} {% if hover_enabled %} {{ variant.product.title }} - {{ variant.title }} {% else %} {{ variant.product.title }} - {{ variant.title }} {% endif %} {% if collection_handles contains 'coming-soon' %} {% if settings.stickers_enabled == false %} {{ 'collections.general.coming_soon' | t }} {% endif %} {% else %} {% if variant_price > 0 %} {% render 'price-element', price: variant_price %} {% else %} {{ settings.free_price_text }} {% endif %} {% endif %}
{% endif %} {% if settings.enable_quickshop %} {% render 'product-thumbnail__quick-shop-button', product: variant.product %} {% endif %} {% if hover_enabled %} {% if settings.enable_shopify_collection_badges %} {% endif %} {% endif %}
{% endif %}
{% if hover_enabled == false %}
{% if settings.display_vendor %} {{ variant.product.vendor }} {% endif %} {% if hover_enabled %} {{ variant.product.title }} - {{ variant.title }} {% else %} {{ variant.product.title }} - {{ variant.title }} {% endif %} {% if collection_handles contains 'coming-soon' %} {% if settings.stickers_enabled == false %} {{ 'collections.general.coming_soon' | t }} {% endif %} {% else %} {% if variant.price > 0 %} {% render 'price-element', price: variant.price %} {% else %} {{ settings.free_price_text }} {% endif %} {% endif %}
{% endif %}
{% endif %}