Jump to content

Google Trusted Stores - New Guidelines


ajensen27

Recommended Posts

Just received an email today from Google Trusted Stores that they have relaxed some of their previous requirements making it much easier to implement. With that said, can someone please help with figuring out the variables that need to be placed in the code below? Along with how you can repeat the item specific code for each item ordered in an order?

 

Here's the code snipped that needs to go on the order confirmation page and here's the page explaining the variables https://support.google.com/trustedstoresmerchant/answer/6063087?authuser=1&p=ordercode&authuser=1&rd=1

 

<!-- START Google Trusted Stores Order -->
<div id="gts-order" style="display:none;" translate="no">

<!-- start order and merchant information -->
<span id="gts-o-id">MERCHANT_ORDER_ID</span>
<span id="gts-o-domain">MERCHANT_ORDER_DOMAIN</span>
<span id="gts-o-email">CUSTOMER_EMAIL</span>
<span id="gts-o-country">CUSTOMER_COUNTRY</span>
<span id="gts-o-currency">CURRENCY</span>
<span id="gts-o-total">ORDER_TOTAL</span>
<span id="gts-o-discounts">ORDER_DISCOUNTS</span>
<span id="gts-o-shipping-total">ORDER_SHIPPING</span>
<span id="gts-o-tax-total">ORDER_TAX</span>
<span id="gts-o-est-ship-date">ORDER_EST_SHIP_DATE</span>
<span id="gts-o-est-delivery-date">ORDER_EST_DELIVERY_DATE</span>
<span id="gts-o-has-preorder">HAS_BACKORDER_PREORDER</span>
<span id="gts-o-has-digital">HAS_DIGITAL_GOODS</span>
<!-- end order and merchant information -->

<!-- start repeated item specific information -->
<!-- item example: this area repeated for each item in the order -->
<span class="gts-item">
<span class="gts-i-name">ITEM_NAME</span>
<span class="gts-i-price">ITEM_PRICE</span>
<span class="gts-i-quantity">ITEM_QUANTITY</span>
<span class="gts-i-prodsearch-id">ITEM_GOOGLE_SHOPPING_ID</span>
<span class="gts-i-prodsearch-store-id">ITEM_GOOGLE_SHOPPING_ACCOUNT_ID</span>
<span class="gts-i-prodsearch-country">ITEM_GOOGLE_SHOPPING_COUNTRY</span>
<span class="gts-i-prodsearch-language">ITEM_GOOGLE_SHOPPING_LANGUAGE</span>
</span>
<!-- end item 1 example -->
<!-- end repeated item specific information -->

</div>
<!-- END Google Trusted Stores Order -->

 

 

This code also needs to go on each page but is a little more self explanatory but in case anyone was wondering (I put this in the footer.tpl page and surrounded it by literal tags).

 

<!-- BEGIN: Google Trusted Stores -->
<script type="text/javascript">
var gts = gts || [];

gts.push(["id", "xxxxxx"]);
gts.push(["badge_position", "BOTTOM_RIGHT"]);
gts.push(["locale", "PAGE_LANGUAGE"]);
gts.push(["google_base_offer_id", "ITEM_GOOGLE_SHOPPING_ID"]);
gts.push(["google_base_subaccount_id", "ITEM_GOOGLE_SHOPPING_ACCOUNT_ID"]);
gts.push(["google_base_country", "ITEM_GOOGLE_SHOPPING_COUNTRY"]);
gts.push(["google_base_language", "ITEM_GOOGLE_SHOPPING_LANGUAGE"]);

(function() {
var gts = document.createElement("script");
gts.type = "text/javascript";
gts.async = true;
gts.src = "https://www.googlecommerce.com/trustedstores/api/js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(gts, s);
})();
</script>
<!-- END: Google Trusted Stores -->

Link to comment
Share on other sites

Bumping to the top... I think this is fantastic news as it seems to make being a Google Trusted Store so much easier. Now if we can just figure out what all these parameters are in Prestashop.  :)

 

Think I have these one's figured out from being used before

 

MERCHANT_ORDER_ID = {$order->id}

MERCHANT_ORDER_DOMAIN = http://www.yourdomain.com

CUSTOMER_EMAIL = {$email}

CUSTOMER_COUNTRY = ???

ORDER_TOTAL = {$order_total_paid}

CURRENCY = ??? (for me this would always be dollars or 840)

ORDER_DISCOUNTS = ???

ORDER_SHIPPING = ???

ORDER_TAX = ??? (for me this will always be 0)

ORDER_EST_SHIP_DATE = ??? (for me this will always be the order date +1)

ORDER_EST_DELIVERY_DATE = ??? (for me I would always use order date +4 or if express order date +2)

HAS_BACKORDER_PREORDER = ??? (any way to tell if any items in the order are out of stock?)

HAS_DIGITAL_GOODS = ??? (for me this will always be N)

  • Like 1
Link to comment
Share on other sites

Bumping to the top... I think this is fantastic news as it seems to make being a Google Trusted Store so much easier. Now if we can just figure out what all these parameters are in Prestashop.  :)

 

Think I have these one's figured out from being used before

 

MERCHANT_ORDER_ID = {$order->id}

MERCHANT_ORDER_DOMAIN = http://www.yourdomain.com

CUSTOMER_EMAIL = {$email}

CUSTOMER_COUNTRY = ???

ORDER_TOTAL = {$order_total_paid}

CURRENCY = ??? (for me this would always be dollars or 840)

ORDER_DISCOUNTS = ???

ORDER_SHIPPING = ???

ORDER_TAX = ??? (for me this will always be 0)

ORDER_EST_SHIP_DATE = ??? (for me this will always be the order date +1)

ORDER_EST_DELIVERY_DATE = ??? (for me I would always use order date +4 or if express order date +2)

HAS_BACKORDER_PREORDER = ??? (any way to tell if any items in the order are out of stock?)

HAS_DIGITAL_GOODS = ??? (for me this will always be N)

I am having the same dilemma with this portion of the code. SOMEONE out there must know exactly what data should go in each field to make this work with Prestashop.....anyone?

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...
  • 3 months later...
  • 1 month later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...