Skip to content

Instantly share code, notes, and snippets.

@jakeleboeuf
Last active October 6, 2015 17:32
Show Gist options
  • Save jakeleboeuf/855a159e5a5fc0f7a872 to your computer and use it in GitHub Desktop.
Save jakeleboeuf/855a159e5a5fc0f7a872 to your computer and use it in GitHub Desktop.
Add customer info to cart object
{% layout none %}
{% assign data = cart | json %}
{% assign customer_name = customer.first_name | json %}
{% comment %}
// Or is there a merge filter in liquify??
{% assign mergeData = data | merge({'customer_name': customer_name}) %}
{{ mergeData }}
{% endcomment %}
{% if shop.customer_accounts_enabled %}
{% if customer %}
{% assign data.customer_name = customer_name %}
{% endif %}
{% endif %}
{{ data }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment