I need to pass a modified 3dcart variable [price] to a meta tag declaration.
3dcart has the following open graph meta tag automatically (from SEO tools page)
This results in the following HTML in the browser page source for a $99.95 example :
For Pinterest Rich Pins we need to strip the currency symbol $ from the tag as in this :
The following Javascript code appears to strip the symbol when used outside of 3dcart (tested in JS fiddle) :
Here's my question as I don't know JS nor HTML really ...
How can I get an additional meta tag declaration in the HEAD of the frame.html template to produce the needed Rich Pin open graph meta declaration above ?
I tried to use document.write(); but it just passes the source code right into the HTML at the browser, it must need to be called or something and thought someone on this forum might know the quick solution to what I'm missing.
Thanks so much in advance (and for others wanting to use Pinterest Rich Pins - I'll post the final solution clearly once working).
Ed
3dcart has the following open graph meta tag automatically (from SEO tools page)
<meta property="og:price" content="[price]">
This results in the following HTML in the browser page source for a $99.95 example :
<meta property="og:price" content="$99.95">
For Pinterest Rich Pins we need to strip the currency symbol $ from the tag as in this :
<meta property="go:price:amount" content="99.95">
The following Javascript code appears to strip the symbol when used outside of 3dcart (tested in JS fiddle) :
var priceNoCurrency = "[price]";
priceNoCurrency = priceNoCurrency.substring(1);
priceNoCurrency = priceNoCurrency.substring(1);
Here's my question as I don't know JS nor HTML really ...
How can I get an additional meta tag declaration in the HEAD of the frame.html template to produce the needed Rich Pin open graph meta declaration above ?
I tried to use document.write(); but it just passes the source code right into the HTML at the browser, it must need to be called or something and thought someone on this forum might know the quick solution to what I'm missing.
Thanks so much in advance (and for others wanting to use Pinterest Rich Pins - I'll post the final solution clearly once working).
Ed
Comment