Hide price when price is zero

Hide price when price is zero

In price.liquid, replace:

{% render 'price',
  show_unit_price: true,
  product_resource: product_resource,
  show_sale_price_first: block_settings.show_sale_price_first
%}

with

{% if product_resource != blank and product_resource.price > 0 %}
  {% render 'price',
    show_unit_price: true,
    product_resource: product_resource,
    show_sale_price_first: block_settings.show_sale_price_first
  %}
{% endif %}
    • Related Articles

    • Hide price when price equal to zero

      In price.liquid, add the following: <div class="price_regular"> {% if product.price > 0 %} <span class="visually-hidden visually-hidden <span class="price-item price-item--regular”> {{ money_price }} </ span> {% endif %}
    • Hide variants that is out of stock

      Add the following in variant-main-picker.liquid {%- for product_option_value in product_option.values -%} {% # hide variants = 0 # %} {% if product_option_value.available == false %} {% continue %} {% endif %} {% # End hide variants = 0 # %} {% if ...
    • Hide products from Google & Shopify Search

      1. Access Your Shopify Admin Log in to your account to enter the backend of your store. Familiarize yourself with the intuitive Shopify admin page and interface, setting the stage for effortless product management. Think of it as your store's control ...
    • Remove/hide Sold out Badge for out of stock Products

      In base.css file, add this code at the bottom: .grid__item .card-wrapper:has(.price--sold-out) .card--media .card__badge { display: none !important; }
    • Hide placeholder when image is N/A storewide

      Add the following in base.css /* Hide all placeholder images storewide */ img[src*="placeholder"] { display: none !important; } /* For background placeholders */ [class*="placeholder"], .placeholder { display: none !important; background: none ...