Need to swap compare and current price around

Topic summary

A user is experiencing a Google crawling issue and believes swapping the display order of compare-at price and current price might resolve it. Currently, their product page shows “Compare Price / Current Price” but they want to reverse this to “Current Price / Compare Price”.

The user has reviewed similar posts but finds their product-price.liquid code differs from examples, making it difficult to implement the change independently. They attempted rearranging code sections without success.

The provided code snippet shows the current structure with liquid template logic handling price display, including:

  • Current variant price assignment
  • Compare price conditional logic
  • Price wrapper divs for original and compare prices
  • Unit pricing display logic

The discussion remains open with no solution provided yet. The user is seeking guidance on how to properly modify their specific code structure to achieve the desired price order swap.

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

I think we have a crawling issue on Google and want to swap the compare and current price around to see if it fixes the problem. So currently it shows Compare Price / Current Price and we want it the other way around. I’ve looked up other posts but our code seems to be different and I cannot work it out. Below is our current product-price.liquid. I tried moving all the sections around which show

{%- liquid
assign tax_included_t = ‘products.tax_included’ | t

assign current_variant = product.selected_or_first_available_variant
assign compare_enabled = false
if current_variant.compare_at_price > current_variant.price
assign compare_enabled = true
endif
-%}

<product-price-root
class=“product-price–root”
data-id=“{{ id }}”
style=“display:block;”

{{ current_variant.price | money }}
{% if compare_enabled %} {{ current_variant.compare_at_price | money }} {% endif %}
{{- current_variant.unit_price | money -}} / {%- if current_variant.unit_price_measurement.reference_value != 1 -%} {{- current_variant.unit_price_measurement.reference_value -}} {%- endif -%} {{- current_variant.unit_price_measurement.reference_unit -}}

{%- unless settings.product–quick-add-enabled -%}

{%- endunless -%}