Forum
Display price without currency symbol
Hi,
I am adding my Shop data to Google Shopping, and need to use the price without currency code for one of the pieces of Schema information. I currently have this as part of my product detail template:
<meta itemprop="priceCurrency" content="GBP" />
<meta itemprop="price" content="<perch:shop id="price" type="shop_currency_value"/>" />
But that is outputting £115
for the price, rather than 115
. Is there a way of accessing the value of the GBP price without the symbol in the template?
Thanks!
Mike
There should be. What does
<perch:showall />
give you?In
showall
there is an array forprice
and an array forcurrent_price
, both look like this:But not sure how I can access these in my
product_detail.html
templateWhich page function are you using?
Pretty standard:
At the moment that will always return the formatted version. I'll see if we can add an option, but in the mean time, can you
replace
the currency symbol out?Ah ok so
I will give it a go tomorrow and see how it goes
Hi Drew,
That worked thanks!