Jump to content

Use a variable price value for schema on product.tpl


Recommended Posts

So I have a PS v1.6.1.17 installation which I have a recurring problem with Google banning variable products because the schema.org price is not updating when the product combination is changed. 

When the product combination is changed, the schema value for price is not changing as it is being passed through the variable $productPrice which is static doesn't change from the default combination.

I want the value of this to reflect the price of the currently selected combination.

e.g. for the default combination this would produce a value of 1.11 in the content 

<meta itemprop="price" content="{$productPrice}" />

But when I change to the next combination (product price 9.99) this value does not change and stays at 1.11

When I change this {$productPrice} variable to something else like {$priceDisplay} it changes the html to this:

<meta itemprop="price" content />

I can't seem change this to the price of the currently selected combination. HELP!

Edited by Guy @ GCL (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...