Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello,
New to shopify and trying to figure out how to use a default value in the case where I do not have a customer's first name. I found a snippet of code online but it did not work as expected.
Dear {{ customer.name | default: "customer" }},
Thanks!
Hi @ajmurray1234,
Please change code:
{% unless customer.name == blank %}
Dear {{ customer.name }},
{% else %}
Dear customer,
{% endunless %}
Hope it helps!