Can you conceal product prices in a Shopify JSON file?

Roger_McEffort
Shopify Partner
43 0 7

How do you hide prices from a product's JSON?

I know how to physically remove it from the page, but the price is still visible if you add the .json suffix to the product in the URL .

Replies 5 (5)

David_Weru
Shopify Partner
177 16 43
Roger_McEffort
Shopify Partner
43 0 7

@David_Weru wrote:

The json for product info is always accessible.

🙄 Another ridiculous Shopify quirk. I suppose it is what it is then. 

David_Weru
Shopify Partner
177 16 43

@Roger_McEffort, from a development standpoint, it limits pings to the server by having all that data upfront and leaving theme developers room on how to present it.   

Private data thankfully is hidden away.  I'd contact support about this.  Maybe they know how to filter data which gets served out.  (Might break features using that data afterwards but can't hurt to ask.)

David_Weru
Shopify Partner
177 16 43

@anna12352 

This is an example from your store:

I'll add a .json in a link below pointing to one of your products.  This info about products is always accessible.  

https://datsuzokudecor.com/products/akarui-plates?variant=37455792865436

https://datsuzokudecor.com/products/akarui-plates.json?variant=37455792865436

cepheid
Shopify Partner
3 0 0

You can use metafields to keep sensitive information. Metafields will not be visible in .json. But of cause, you will have to modify the theme to switch from using product price to a metafield.