Shopify添加微数据代码

    <div itemscope itemtype="http://schema.org/Product" class="product" style="margin-bottom:20px!important;">
      
         <meta itemprop="url" content="{{ shop.url }}{{ product.url | append: '?variant='}}{{ product.variants[0].id }}">
         <meta itemprop="image" content="{{ product.featured_image.src | product_img_url: 'grande' }}">
         <meta itemprop="gtin12" content="{{product.variants[0].barcode}}">
         <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
          
            <meta itemprop="priceCurrency" content="{{ shop.currency }}">
            <meta itemprop="price" content="{{ product.variants[0].price | money_without_currency }}" />
            <meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition"/>
            <link itemprop="availability" href="http://schema.org/{% if product.variants[0].available %}InStock{% else %}OutOfStock{% endif %}">

          </span>

product-template.liquid内添加以上代码

发表评论

电子邮件地址不会被公开。 必填项已用*标注