name: 'Google Shopping Review'
type: xml
logo: google_shopping.png
description: 'Google Shopping is a Google service that allows consumers to search for, compare, and shop for physical products across different retailers who have paid to advertise their products. Google Shopping not only promotes your business, but also makes it easier for potential customers to search for, research, and compare products.'
guide_link: https://developers.google.com/product-review-feeds/schema
is_user_defined: 0
is_popular: 0
marketplace: google
gmc_content_type: product_reviews
xml:
  schema: |
    <?xml version="1.0" encoding="UTF-8"?>
    <feed xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="http://www.google.com/shopping/reviews/schema/product/2.3/product_reviews.xsd">
      <version>2.3</version>
      <aggregator>
        <name>Sample Reviews Aggregator (if applicable)</name>
      </aggregator>
      <publisher>
        <name>Sample Retailer</name>
        <favicon>{{ context.store.base_url }}favicon.png</favicon>
      </publisher>
      <reviews>
        {% for review in context.reviews %}
        <review>
          <review_id>{{ review.id }}</review_id>
          <reviewer>
            <name>{{ review.nickname | replace: ' ', '_' }}</name>
          </reviewer>
          <review_timestamp>{{ review.created_at  | dateFormat: 'c' }}</review_timestamp>
          <title><![CDATA[{{ review.title }}]]></title>
          <content><![CDATA[{{ review.detail }}]]></content>
          <review_url type="singleton"><![CDATA[{{ review.product.url }}]]></review_url>
          <ratings>
            <overall min="1" max="5">{{ review.rating }}</overall>
          </ratings>
          <products>
            <product>
              <product_ids>
                <mpns>
                  <mpn><![CDATA[{{ review.product.sku }}]]></mpn>
                </mpns>
                <skus>
                  <sku><![CDATA[{{ review.product.sku }}]]></sku>
                </skus>
                <brands>
                  <brand><![CDATA[{{ review.product.manufacturer }}]]></brand>
                </brands>
              </product_ids>
              <product_name><![CDATA[{{ review.product.name }}]]></product_name>
              <product_url><![CDATA[{{ review.product.url }}]]></product_url>
            </product>
          </products>
        </review>
        {% endfor %}
      </reviews>
    </feed>
