Hello,
I want to get the product variant id to add some script to it.
For example: {{- product.selected_or_first_available_variant.id -}} outputs 44243511738635
When I try this:
{{- product.selected_or_first_available_variant.id -}}
{%- if product.selected_or_first_available_variant.id == ‘44243511738635’ -%}
test
{%- endif -%}it gives:
44243511738635
instead of
44243511738635
test
Why is this line {%- if product.selected_or_first_available_variant.id == ‘44243511738635’ -%} not working?