I would like to add a conditional on some pages in my Shopify theme that displays more info if the user viewing the page is an admin (and is logged in). Is there a way to do this? The obvious way is to check the customer.email property against some hard-coded values that belong to admins. But that's a maintenance headache and a poor design. Is there a better way?
Thanks.
There is no list of Shop accounts available to check against. The only check you could make against is the shop email address or the shop customer_email and that is kinda loser-ish.
You're in tough on this one as Shopify does not yet provide any Shop accounts. Even the embedded SDK's for POS and WWW provide nothing more than "this user is an admin, or this user is a staff account", but no identifying data.