Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
Need help coding: hide specific product from all customers except for one tagged customer
Post Flair (click to view more posts with a particular flair)
Post Body

I've done google searches and found a few "how to" blogs/documents that outline this but they're all apparently for the old Shopify 1.0 themes. I'm on the 2.0 Craft theme. So for example, when the docs say to go into theme customization and make a new "product" template based on the existing template and it will generate a new product.hidden.liquid file....

No, it creates a new JSON file but not a new liquid file. Which is okay but it means I need to manually create the liquid file, I guess. So... anybody here with experience on the 2.0 themes want to help me out?

I DO NOT WANT AN APP. I DO NOT WANT TO HIRE A DEVELOPER.

Phew, sorry for yelling but I wanted to head off those DMs before they start. I used to be a software engineer so I know I can do this myself, just need a little bit of help. And I'm not paying for an app to do this.

So just to clarify, I want to make a product hidden from all customers except one customer who I tag with a special code. It should be hidden from the collection pages unless it's that one specific-tagged customer who views it.

From what I understand, it would go like this:

  • (backup the theme, already done of course)
  • copy product.liquid to a new product.hidden.liquid template
  • tweak the product.hidden.liquid file to check the customer tag

Do I need to do something similar for the collection template where this product resides?

Author
Account Strength
100%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
27,266
Link Karma
3,629
Comment Karma
23,336
Profile updated: 20 hours ago
Posts updated: 5 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago