Skip to content

Instantly share code, notes, and snippets.

@carbone carbone/Single Select Secret
Created Jun 10, 2018

Embed
What would you like to do?
{% if product.metafields.custom_fields["availability"] != blank and
product.metafields.custom_fields["availability"] != 'Not applicable' %}
{% assign availability = product.metafields.custom_fields["availability"] %}
{% case availability %}
{% when '2 weeks' %}
{% assign message = 'This product usually ships in 2 weeks.' %}
{% when 'Immediately' %}
{% assign message = 'This product usually ships right away.' %}
{% endcase %}
<div class="custom-field custom-field__availability custom-field__type--text-list">
<strong class="custom-field--title">Availability</strong>
<div class="custom-field--value">
{{ message }}
</div>
</div>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.