专注出海运营平台,解决跨境电商问题
当前位置:跨境智通山 > 其他跨境 > 跨境问答 > 正文

shopify本地化搜索引擎中的产品价格步骤

2022-03-22 17:24:54 跨境问答

本地化搜索引擎中的产品价格备注此自定义用于复古 Shopify 模板,不适用于“Online Store 2.0”模板。找到您的模板架构版本探索“Online Store 2.0”模板自定义更新您的模

目录

shopify本地化搜索引擎中的产品价格步骤

shopify本地化搜索引擎中的产品价格步骤详细回答

本地化搜索引擎中的产品价格

备注

此自定义用于复古 Shopify 模板,不适用于“Online Store 2.0”模板。

  • 找到您的模板架构版本

  • 探索“Online Store 2.0”模板自定义

更新您的模板,确保搜索引擎结果中显示价格的所用货币与客户的货币匹配。

搜索引擎通常会在搜索结果中返回产品的价格。当您以多种货币进行销售时,结果中的货币有时与客户的当地货币不匹配。

如果您的客户在搜索结果中遇到这种货币不匹配问题,则您需要编辑商店的模板,以便它包含有关您销售产品所用的区域设置和货币的信息。在大多数情况下,您可以通过调整模板中的以下设置来实现此目标:

  • 结构化数据

  • hreflang 链接

  • 规范 URL 设置

假设您在澳大利亚和新西兰销售产品。一位新西兰客户搜索您的 T 恤。在搜索结果中,他看到了以澳元显示的价格(20 澳元)。当此客户点击结果时,他被定向到新西兰版本的 T 恤产品页面。在此页面上,您的客户看到以新西兰元显示的价格(22 新西兰元)。客户发现搜索结果和产品页面之间的价格存在差异并且感到困惑。因此,此客户没有立刻进行购买。

备注:此页面上的内容仅提供一般信息。如果您有与搜索结果和货币相关的问题,请联系 SEO 专家。您可以通过 Shopify 的专家市场来联系专家。

使用结构化数据

您可以使用页面内标记来构造数据,以便它告知搜索引擎您销售产品所使用的货币。搜索引擎使用结构化数据对您页面上的内容进行分类。结构化数据还用于启用搜索结果功能,例如在结果中显示产品价格。

对于您支持的每种货币,您需要使用 product 结构化数据类型并包含 priceCurrency 属性。此属性描述货币(采用 ISO 4217 格式),并且需要将其设置为 cart.currency.iso_code(不是 shop.currency)。

Debut 模板对结构化数据使用不同的格式,可省去这些步骤。如果您使用 Debut,您可以跳过这些步骤,并从使用 hreflang 属性开始。

步骤:

  1. 在您的模板中搜索嵌套在 offers itemscope 中的 priceCurrency 属性。通常,priceCurrency 在 Sections 文件夹中的 product-template.liquid 中进行定义。如果找不到此属性,请将其添加到 Sections/product-template.liquid

  2. 请确保将 priceCurrency 设置为 cart.currency.iso_code

例如,您的代码应如下所示:

<div itemscope itemtype=”http://schema.org/Product . . .    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">      <meta        itemprop="priceCurrency"        content="{{ cart.currency.iso_code }}"      />      . . .    </div>

您可以使用结构化数据测试工具来测试您的更改。


使用 hreflang 属性

您可以使用 hreflang 属性来告知搜索引擎您的产品页面的不同版本。对于您销售产品所用的每种货币,您需要指定货币应用到的语言(ISO 639-1 格式)和地区(ISO 3166-1 Alpha 2 格式)。

步骤:

  1. 打开您的 theme.liquid 文件。此文件应包含 <link ... > 元素。

  2. 对于您销售产品所用的每种货币,请确保存在 link rel=alternate 元素,例如以下元素:

<link      rel="alternate"      hreflang="LANG-CTRY"      href="{{ canonical_url}}?currency=XXX"    />`.

例如,如果您以美元、英镑和日元进行销售,请确保您的 theme.liquid 包含以下行:

<head>      ...      <link        rel="alternate"        hreflang="en-us"        href="{{ canonical_url }}?currency=USD"      />      <link        rel="alternate"        hreflang="en-gb"        href="{{ canonical_url }}?currency=GBP"      />      <link        rel="alternate"        hreflang="ja-jp"        href="{{ canonical_url }}?currency=JPY"      />      ...    </head>

如果您以欧元 (EUR) 进行销售,则需要指定您支持的区域设置(语言/国家/地区)。对于您支持的每个欧元区域设置,请为该区域设置添加一个 <link> 元素并包含一个 hreflang 属性。

例如,下方代码行可告知搜索引擎应向法国的法语用户、德国的德语用户以及荷兰的英语和荷兰语用户显示以欧元显示的产品页面:

...    <link      rel="alternate"      hreflang="fr-fr"      href="{{ canonical_url }}?currency=EUR"    />    <link      rel="alternate"      hreflang="de-de"      href="{{ canonical_url }}?currency=EUR"    />    <link      rel="alternate"      hreflang="en-nl"      href="{{ canonical_url }}?currency=EUR"    />    <link      rel="alternate"      hreflang="nl-nl"      href="{{ canonical_url }}?currency=EUR"    />    ...
  1. 添加 link rel=alternate 元素并将 hreflang 设置为 x-default。当客户来自您不支持的区域设置时,搜索引擎会使用此回退链接:

<link      rel="alternate"      hreflang="x-default"      href="{{ canonical_url }}"    />

步骤 3:使用规范 URL

您可以告知搜索引擎要用作规范 URL 的 URL。这会告知搜索引擎,所引用的国家/地区特定页面是一个独特的独立页面,而不是另一个页面的副本。设置后,这可帮助搜索引擎确定要显示的货币。请使用 <link rel="canonical" href="{{ canonical_url }}"> 并包含 cart.currency.iso_code

步骤:

  1. 在 theme.liquid 中,搜索规范链接。如果找不到此链接,则添加一个链接:

<link rel="canonical" href="{{ canonical_url }}>"
  1. 请确保您的规范 URL 包含 cart.currency.iso_code

<link      rel="canonical"      href="{{ canonical_url }}?currency={{ cart.currency.iso_code }}"    />

Shopify商户官网原文详情:

Localize your product prices for search engines

Note

This customization is for vintage Shopify themes, and doesn't apply to Online Store 2.0 themes.

  • Find out your theme's architecture version

  • Explore Online Store 2.0 theme customizations

Update your theme to make sure that the prices that appear in search engine results match your customers' currencies.

Search engines often return the price of a product in their search results. When you sell in multiple currencies, sometimes the currency in the results doesn't match your customer's local currency.

If your customers are experiencing this type of currency mismatch in their search results, then you need to edit your store's theme so that it includes information about the locales and currencies that you sell in. In most cases, you can do this by adjusting the following settings in your theme:

  • structured data

  • hreflang links

  • canonical URL settings

For example, you sell in Australia and New Zealand. A customer in New Zealand searches for your t-shirt. In their search results, they see the price in Australian dollars ($20 AUD). When this customer clicks on the result, they are directed to the New Zealand version of the t-shirt's product page. On this page, your customer sees the price in New Zealand dollars ($22 NZD). The customer notices the differences in price between the search results and the product page and is confused. This customer delays making a purchase.

Note

The content on this page is provided for general information only. If you have issues related to search results and currency, then contact an SEO expert. You can contact experts through Shopify's Experts Marketplace.

Use structured data

You can use in-page markup to structure your data so that it tells search engines about the currencies that you sell in. Structured data is used by search engines to classify the content on your pages. It is also used to enable search result features, such as displaying the price of a product in the results.

For each currency that you support, you need to use the product structured data type and include the priceCurrency property. This property describes the currency (in ISO 4217 format), and it needs to be set to cart.currency.iso_code (not shop.currency).

The Debut theme uses a different format for structured data, making these steps unnecessary. If you use Debut, then you can skip these steps and start at Use hreflang attributes.

Steps:

  1. Search your theme for the priceCurrency property that is nested in an offers itemscope. Usually, priceCurrency is defined in the product-template.liquid in the Sections folder. If you can’t find this property, then add it to Sections/product-template.liquid.

  2. Make sure that priceCurrency is set to cart.currency.iso_code.

For example, your code should look like the following:

   <div itemscope itemtype=”http://schema.org/Product . . .    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">      <meta        itemprop="priceCurrency"        content="{{ cart.currency.iso_code }}"      />      . . .    </div>

You can use the Structured Data Testing Tool to test your changes.


Use hreflang attributes

You can use hreflang attributes to tell search engines about the different versions of your product pages. For each currency that you sell in, you need to specify the language (ISO 639-1 format) and region ( ISO 3166-1 Alpha 2 format) that the currency applies to.

Steps:

  1. Open your theme.liquid file. This file should contain <link ... > elements.

  2. For each currency that you sell in, make sure that there is a link rel=alternate element, such as the following element:

   <link      rel="alternate"      hreflang="LANG-CTRY"      href="{{ canonical_url}}?currency=XXX"    />`.

For example, if you sell in USD, GBP, and JPY currencies, then make sure that your theme.liquid contains the following lines:

   <head>      ...      <link        rel="alternate"        hreflang="en-us"        href="{{ canonical_url }}?currency=USD"      />      <link        rel="alternate"        hreflang="en-gb"        href="{{ canonical_url }}?currency=GBP"      />      <link        rel="alternate"        hreflang="ja-jp"        href="{{ canonical_url }}?currency=JPY"      />      ...    </head>

If you sell in euros (EUR), then you need to specify the locales (language/country) that you support. For each EUR locale that you support, add a <link> element and include an hreflang attribute for that locale.

For example, the following lines tell the search engine that the EUR version of the product page should be shown to French speakers in France, German speakers in Germany, and both English and Dutch speakers in the Netherlands:

   ...    <link      rel="alternate"      hreflang="fr-fr"      href="{{ canonical_url }}?currency=EUR"    />    <link      rel="alternate"      hreflang="de-de"      href="{{ canonical_url }}?currency=EUR"    />    <link      rel="alternate"      hreflang="en-nl"      href="{{ canonical_url }}?currency=EUR"    />    <link      rel="alternate"      hreflang="nl-nl"      href="{{ canonical_url }}?currency=EUR"    />    ...
  1. Add a link rel=alternate element and set the hreflang to x-default. Search engines use this fallback link when your customer is from a locale that you don’t support:

   <link      rel="alternate"      hreflang="x-default"      href="{{ canonical_url }}"    />

Step 3: Use a canonical URL

You can tell the search engine what URL to use as the canonical URL. This tells a search engine that the country-specific page being referred to is a distinct, stand-alone page, rather than a duplicate of another page. When set, this helps the search engine determine what currency to display. Use <link rel="canonical" href="{{ canonical_url }}"> and include the cart.currency.iso_code.

Steps:

  1. In theme.liquid, search for the canonical link. If you can't find this link, then add one:

   <link rel="canonical" href="{{ canonical_url }}>"
  1. Make sure that your canonical URL includes the cart.currency.iso_code:

   <link      rel="canonical"      href="{{ canonical_url }}?currency={{ cart.currency.iso_code }}"    />

文章内容来源:Shopify商户官方网站