Have your say in Community Polls: What was/is your greatest motivation to start your own business?

How to hide inventory quantity from page source without third-party apps?

How to hide inventory quantity from page source without third-party apps?

rumgd
Shopify Partner
2 0 0

Customers are viewing page information in the source code and using that to determine how much inventory is available of certain products, and then posting that information online for others to be able to view. We want to be able to stop this, but it seems like the inventory_quantity naming is required for our PDP functionality and that makes it super easy to find with a simple search in the code.

 

How can this information be hidden without using third party apps? 

Replies 2 (2)

Guleria
Shopify Partner
3647 733 1026

  Rename the inventory attributes ( class/id/data-attributes) so the customer cant identify what is it for in the PDP page and also do the same in the JS call so it will not break.  

- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com
- Try GEMPAGES a great page builder
- If you want to help me please PAYPAL
rumgd
Shopify Partner
2 0 0

Assuming we make this change, someone who is able to figure out inventory levels in our current code should also have the knowledge to just check outgoing requests and find the variant inventory_quantity that way though, correct?

 

Also, there are 1000+ stores in our catalog that will be impacted by this change, so changing the naming of something so critical to our core functionality is not easily done.