Depending on how you’ve setup your product prices in Shopify, you might need to modify the product prices for the product page.
For example, VAT is an added tax of 20% for most customers.
If you setup your products in Shopify without the VAT price (called VAT-exclusive prices), you’d need to adjust the public price by adding 20%.
This is commonly done by editing the product template, but when you’re using JSON-LD for SEO you’ll also need to adjust its price too. That’s because JSON-LD for SEO pulls the prices from Shopify directly so it would end up using the wrong price.
This article will describe how to set up a price modifier like VAT in JSON-LD for SEO.
1. Decide if you want to change prices for the whole store or just specific products
Before you start you need to decide if you want to add a price modifier for the entire store, or just for specific products.
For something like VAT, you’ll want to do it store-wide.
2. Calculate your price modifiers
JSON-LD for SEO uses Shopify metafields to adjust the price.
When you set the
price_modifier metafield, JSON-LD for SEO will multiply your price by that.
A few examples:
- Value of 1 would be the regular price, at 100%
- Value of 1.2 would be 120% of the price (e.g. VAT)
- Value of 0.95 would be 95% of the price (e.g. 5% off-storewide)
3. Set the metafields for your store or the products
Depending on what you decided in the first step, you’ll either need to set the metafield for your entire store or for the specific products.
For the store-wide version, create a metafield on the store:
For the product version, create a metafield on the product itself:
Advanced option: If you set both the store and product metafield, the product version will override the store. e.g. 1.2 on the store and 1.05 on the product would result in showing 105% price for that product only while other products show 120% of the price.
4. Make sure your theme is also showing the modified price
You will also need to make sure that your product template is showing the modified price too.
If not, then the page and the JSON-LD structured data will be different Google might question the product price.
Make sure that the prices are consistent.
Changing your theme is beyond this article but most customers just find their product prices in their theme and using the
times liquid filter to adjust the price.
Get more organic search traffic for your Shopify store
Increase organic SEO traffic through Google's Rich Results. One click allows search engines and others to understand your store and products.