2017-05-05 59 views
1

我有一個Adobe Business Catalyst網絡商店,我試圖用谷歌搜索引擎優化目的的架構標記進行標記。業務催化劑 - 如何從架構元內容中刪除英鎊符號

不過的Adobe商業催化劑似乎在£(GBP)符號來扔到架構元的內容和谷歌將不能正確讀取它..

How the {price_tag} is inserted in business catalyst

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

我的問題是 - 如何使用javascript刪除£符號,以便價格正好爲content =「890」而不是content =「£890」

下面是現有的HTML ...

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

下面是代碼實際上是如何加載頁面上...

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

這是我想它加載,使谷歌可以讀取它正確...

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

萬分感謝您的幫助 - 我用這個網站數百次,這是第一次我曾經確實被卡死!

一切順利,

斯科特

回答

0

可以使用{{salePrice}}液體標籤,如果你啓用了液體,並且如果你沒有我強烈建議你開始使用它。

你不想用JavaScript來改變它。我不認爲抓取工具運行JavaScript。您必須在服務器上進行更改。

這是我使用

<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> 

看一看JSON-LD腳本。