How do I output a specific customer's metafield using if?

Solved
tesstesting
Explorer
96 0 5
I have a metafield "reserved" for customers.
customer.metafields.reserved.stuff
 
I need to "output" a specific customer's metafield ("reserved") in the .product-card-list.liquid "if" the product.tags contain "X".
Something like this:
 
{% if product.tags contains "reservedforTom"}
{{ customerID.customer.metafields.reserved.stuff }}
{% endif %}
 
How can I output a specific customer's metafield on the product-card-list based on their customer.id?
0 Likes
Jason
Shopify Expert
10360 158 2003

This is an accepted solution.

You are not going to be able to use the Customer ID. However, if the customer is logged in you'll be able to access the metafields via :

{{ customer.metafields.reserved.stuff }}

 Not 100% sure on your usage/context but skip the ID aspect.

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★