How do I display another Variant for Price/Price upon Request

lordlauzi
Excursionist
58 0 2

Hello, I would like to display "Ordered" in addition to "Price upon request and the normal price shown. I tried to use this code in my Product-price liquid.

{% if product.price == 0 %}
  {%- assign money_price = "Preis auf Anfrage" -%}
{% else %}
  {%- assign money_price = price | money -%}
{% endif %}
{%if product.variants.first.inventory_quantity == -1 %}
{%- assign money_price = "Ordered"-%}
{% endif %}

Screenshot_2019-07-31 Geschosse.png

 

I tried show ordered if the product quantity is -1

  • -
Replies 0 (0)