Produktpreise für bestimmte Produkte ausblenden

Topic summary

Problemstellung:\nEine Nutzerin möchte für bestimmte Produkte (Unikate) im Shopify-Theme \

Summarized with AI on November 21. AI used: claude-sonnet-4-5-20250929.

Hallo zusammen,

ich würde gerne für bestimmte Produkte (Unikate) die Preise ausblenden.

Ich hab zwei Produktarten: Standardprodukte und Unikate. Bei den Standardprodukten ist die Theme-Vorlage Standardprodukt (product.json) und bei den Unikaten die Theme-Vorlage Unikat (product.unikat.json) hinterlegt. Als Theme nutze ich “Symmetry”.

Ich würde gerne für die Unikate den Preis ausblenden und stattdessen nur “Preis auf Anfrage” anzeigen lassen.

Zwar weiß ich, dass ich die Theme-Vorlage Unikat (product.unikat.json) so gestalten, dass sie kein Preis enthält und ein Rich-Text “Preis auf Anfrage” eingefügt ist. Damit habe ich aber noch nicht gelöst, dass der Preis für die Unikaten noch bei Collections, Featured Collections, etc. angezeigt wird.

Ich würde dies gerne mit einer Änderung des Codes lösen, d.h. das für alle Produkte, die auf der Theme-Vorlage Unikat (product.unikat.json) basieren, der Preis ausgeblendet wird und “Preis auf Anfrage” da steht. Könnte mir hier jemand weiterhelfen?

Vielen lieben Dank schon mal!

@KerstinK grundsätzlich würde ich es nicht empfehlen Änderungen im Code am Template über die JSON-Dateien zu machen. Diese wirken sich nämlich selten auf die Elemente aus, die man letztlich bearbeiten möchte.

In deinem Fall würde es sich ggf. lohnen, mit Tags oder einem Metafeld zu arbeiten. Dann kannst du im Code (product-block.liquid) folgende Kondition anwenden:

{% if product.tags contains 'unikat' %}

  Preis auf Anfrage

{% else %}

  [...]<--- Standard-Code

{% endif %}

Ich hoffe, das hilft dir weiter.

1 Like

Hallo,

vielen lieben Dank für deine schnelle Antwort! Das klingt nach einer sehr guten Lösung. Ich hab sowieso schon das Produkt-Tag “unikat” bei den Unikat-Produkten angelegt. Leider ist mir noch nicht ganz klar an welcher Stelle ich den Code im product-block.liquid einfügen muss … ?

Show More

{% if product.featured_media %} {%- liquid assign aspect_ratios_same = true for media in product.media offset: 1 if media.preview_image.aspect_ratio != product.media.first.preview_image.aspect_ratio assign aspect_ratios_same = false break endif endfor -%}

{%- if show_hover_image -%}
{%- render 'responsive-image', image: product.media.first.preview_image, manual_image_load: manual_image_load, min_aspect_ratio: 0.6, aspect_ratio: custom_aspect_ratio, no_max_width: true, cover: settings.prod_thumb_crop -%}
{%- for media in product_images offset: 1 -%} {%- liquid assign image_state_class = '' if media.id == product.featured_media.id assign active_media_found = true assign image_state_class = 'product-block__image--active' else if active_media_found assign active_media_found = false assign image_state_class = 'product-block__image--show-on-hover product-block__image--inactivated' else assign image_state_class = 'product-block__image--inactivated' endif endif -%}

{%- endfor -%} {%- else -%}{%- render 'responsive-image', image: product.featured_media.preview_image, manual_image_load: manual_image_load, min_aspect_ratio: 0.6, aspect_ratio: custom_aspect_ratio, no_max_width: true, cover: settings.prod_thumb_crop -%}
{%- endif -%}
{%- if show_hover_image -%} {%- unless no_swiping -%}

{%- if product_images.size > 2 -%}
{%- endif -%}
{%- endunless -%} {%- endif -%} {% render 'product-label', product: product, cheapest_variant: cheapest_variant %}
{%- if show_hover_image -%} {%- render 'svg-chevron-left', stroke_width: 1.3 -%} {%- render 'svg-chevron-right', stroke_width: 1.3 -%} {%- endif -%} {% if settings.quickbuy_style == 'button' %} {% unless no_quick_buy %} {{ 'products.quick_buy.launch' | t }} {% endunless %} {% endif %}
{% else %}
{{ 'product-1' | placeholder_svg_tag }}

{% endif %}

{%- if section.settings.show_vendor -%}
{{ product.vendor | escape }}
{%- endif -%}{{ product.title | escape }}
{%- if settings.prod_thumb_show_subtitle and product.metafields.descriptors.subtitle != blank -%}{{ product.metafields.descriptors.subtitle }}
{%- endif -%}{% if product.price_varies %} {{ 'products.listing.from' | t }} {% endif %} {%- if settings.product_currency_code_enabled -%} {{ cheapest_variant.price | money_with_currency }} {%- else -%} {{ cheapest_variant.price | money }} {%- endif -%} {% if cheapest_variant.compare_at_price > cheapest_variant.price %} {{ cheapest_variant.compare_at_price | money }} {% endif %} {% if settings.prod_sold_out_show and product.available == false %} {{ 'products.labels.sold_out' | t }} {% elsif settings.prod_pre_order_label_show and product.template_suffix contains 'preorder' %} {{ 'products.product.preorder' | t }} {% elsif settings.prod_sale_show and cheapest_variant.compare_at_price > cheapest_variant.price %} {{ 'products.labels.sale' | t }} {% endif %}
{% render 'unit-price', variant: cheapest_variant %}{%- if settings.prod_thumb_show_options -%} {%- liquid assign option_limit = 3 assign options_to_show = settings.swatch_option_name | append: ',' | append: settings.prod_thumb_options_names | replace: ', ', ',' | split: ',' -%} {%- for product_option in product.options_with_values -%} {%- if options_to_show contains product_option.name -%} {%- liquid if settings.swatch_enabled and settings.swatch_option_name contains product_option.name assign is_swatch = true else assign is_swatch = false endif -%}

{%- if product.options.size == 1 -%} {%- for variant in product.variants -%} {%- liquid if is_swatch and settings.swatch_method == 'image' and variant.featured_media == blank continue endif -%} {{ variant.title | escape }} {%- endfor -%} {%- if product.variants.size > option_limit and is_swatch -%} {%- assign remaining = product.variants.size | minus: option_limit -%} {{ 'collections.general.more_swatches' | t: count: remaining }} {%- endif -%} {%- else -%} {%- assign product_option_position_0index = product_option.position | minus: 1 -%} {%- for product_option_value in product_option.values -%} {%- liquid assign option_value_variant = false for variant in product.variants if variant.options[product_option_position_0index] == product_option_value assign option_value_variant = variant break endif endfor if settings.prod_thumb_options_disable_unavailable assign is_unavailable = true for variant in product.variants if variant.available and variant.options[product_option_position_0index] == product_option_value assign is_unavailable = false break endif endfor else assign is_unavailable = false endif if is_swatch and settings.swatch_method == 'image' and option_value_variant.featured_media == blank continue endif -%} {{ product_option_value | escape }} {%- endfor -%} {%- if product_option.values.size > option_limit and is_swatch -%} {%- assign remaining = product_option.values.size | minus: option_limit -%} {{ 'collections.general.more_swatches' | t: count: remaining }} {%- endif -%} {%- endif -%}

{%- endif -%} {%- endfor -%} {%- endif -%} {%- if settings.enable_product_reviews_collection and product.metafields.reviews.rating_count != blank -%} {%- assign rating_count = product.metafields.reviews.rating_count | plus: 0 -%} {%- if rating_count > 0 -%}{% render 'rating', rating_value: product.metafields.reviews.rating.value %} {{ rating_count }} {{ 'products.product.reviews_link' | t: count: rating_count | downcase }} 
{%- endif -%} {%- endif -%}

{%- if settings.quickbuy_style != 'off' -%} {%- unless no_quick_buy_markup or no_quick_buy -%}{% render 'svg-x', stroke_width: 1 %}

{%- endunless -%} {%- endif -%}

Vielen lieben Dank schon mal!

Hallo, es hat sich erledigt. Ich weiß jetzt wo ich den Code einfügen muss. Vielen lieben Dank!

Hi @KerstinK,

vielen Dank für deinen Post und das Update dazu.

Es freut mich sehr zu hören, dass du eine Lösung für die Codeanpassung deines Symmetry Themes finden konntest.

Würdest du hier mit uns teilen wie du das geschafft hast, sodass andere Forumsnutzer mit derselben Frage auch von deinem Wissen profitieren können? Das wäre super!

Was für Unikate verkaufst du in deinem Shopify Shop und tust du dies ausschließlich online oder auch in Person und wenn auch nur durch die Möglichkeit, dass Kunden ihre Bestellungen bei dir abholen können?

@Finer Guten Morgen, ich habe das gleiche Problem in einem anderen Kontext. Allerdings nutze ich das Studio Theme.. Ich habe mehrere Ansätze recherchiert, allerdings finde ich in keinem Falle die passende (beschriebene) liquid Datei.

Die product-block.liquid für deine Lösung gibt es in meinem Theme z.B. nicht. Weißt du zufällig in der welcher Datei ich das Tag abfragen muss, um einzelne Preise in meiner Kollektion durch “Preis auf Anfrage” zu ersetzen? Darüber würde ich mich freuen..

VG

Danke.. diese Frage hast ja dann bereits in dem andern Thread “Ausblenden Einiger Preise In Der Kollektion (Studio Theme)” beantwortet… Dankeschön!


{% if product.tags contains 'Unikate' %}
  Preis auf Anfrage
{% else %}
  {{ product.price | money }}
{% endif %}

{% comment %}
{% if product.price_varies %}
{{ 'products.listing.from' | t }}
{% endif %}

{%- if settings.product_currency_code_enabled -%}
{{ cheapest_variant.price | money_with_currency }}
{%- else -%}
{{ cheapest_variant.price | money }}
{%- endif -%}

{% if cheapest_variant.compare_at_price > cheapest_variant.price %}
{{ cheapest_variant.compare_at_price | money }}
{% endif %}
{% endcomment %}

Ich hab im product-block.liquid den neuen Code nach

eingefügt und einen Teil des Codes auskommentiert, dann hat es bei mir funktioniert …