Business Catalyst - How to remove the pound symbol from schema meta content

47 views Asked by At

I have an Adobe Business Catalyst web store which I am trying to markup with schema tags for Google SEO purposes.

However Adobe Business Catalyst seems to throw in a £ (GBP) symbol into the schema meta content and Google won't read it correctly..

How the {price_tag} is inserted in business catalyst

How the {price_tag} is actually spat out on the loaded page

My question is - How do I remove the £ symbol with javascript so that the price just reads content="890" instead of content="£890"

Here's the existing html...

    <meta itemprop="priceCurrency" content="GBP">
    <meta itemprop="price" content="{tag_saleprice}">

Here is how the code actually loads on the page...

    <meta itemprop="priceCurrency" content="GBP">
    <meta itemprop="price" content="£890">

This is how I want it to load so that Google may read it correctly...

    <meta itemprop="priceCurrency" content="GBP">
    <meta itemprop="price" content="890">

Thanks ever so much for your help - I've used this site hundreds of times and this is the first time I have ever been truly stuck!

All the best,

Scott

1

There are 1 answers

0
Daut On

You can use the {{salePrice}} Liquid tag if you have Liquid enabled, and If you do not I strongly recommend you start using it.

You don't want to use JavaScript to change it. I don't think crawlers run JavaScript. You have to do the change on the server.

This is the script I use

<pre><script type="application/ld+json">
{
  "@context": "http://schema.org/",
  "@type": "Product",
      "name": "{{name}}",
  "image": "http://www.example.co.uk{tag_largeimage_path}",
  "description": "{{ Description | strip_html}}",
      "sku": "{tag_productcode}",
  "brand": {
    "@type": "Thing",
    "name": "{{custom1}}"
  },
  "offers": {
    "@type": "Offer",
    "priceCurrency": "GBP",
    "price": "{{salePrice}}",
    "itemCondition": "New",
    "availability" :"InStock",
    "seller": {
      "@type": "Organization",
      "name": "Name of the shop"
    }
  }
}
</script></pre>

Have a look at JSON-LD.