SearchFit - Ecommerce Platform Live Chat Call Us Today! 888.398.4703

Help with Text / HTML Keywords - Code

 
Post new topic   Reply to topic    forums.searchfit.com Forum Index -> SearchFit Questions and Suggestions
View previous topic :: View next topic  
Author Message
dan
2


Joined: 29 Dec 2009
Posts: 33

PostPosted: Thu Jul 12, 2012 3:42 am GMT    Post subject: Help with Text / HTML Keywords - Code Reply with quote

We are tying to integrate the Google Trusted Stores Code into our website. But need help replacing the code variables!

You can reference https://support.google.com/trustedstoresmerchant/bin/answer.py?hl=en&answer=2609894&ctx=go#Section2 for help.

Here is what we have so far.
The text in red is what we need help with.

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

<!-- start order and merchant information -->
<span id="gts-o-id">SCART_ORDER_NUMBER</span>
<span id="gts-o-domain">www.fullspectrumsolutions.com</span>
<span id="gts-o-email">CUSTOMER_EMAIL</span>
<span id="gts-o-country">US</span>
<span id="gts-o-currency">USD</span>
<span id="gts-o-total">SCART_ORDER_AMOUNT_TOTAL_USDOLLAR</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-has-preorder">Y</span>
<span id="gts-o-has-digital">N</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">SCART_ORDER_QTY_TOTAL</span>
<span class="gts-i-prodsearch-id">ITEM_PRODUCT_SEARCH_ID</span>
<span class="gts-i-prodsearch-store-id">ITEM_PRODUCT_SEARCH_ACCOUNT_ID</span>
<span class="gts-i-prodsearch-country">ITEM_PRODUCT_SEARCH_COUNTRY</span>
<span class="gts-i-prodsearch-language">ITEM_PRODUCT_SEARCH_LANGUAGE</span>
</span>
<!-- end item 1 example -->
<!-- end repeated item specific information -->

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


You can reference https://support.google.com/trustedstoresmerchant/bin/answer.py?hl=en&answer=2609894&ctx=go#Section2 for help.

Any help would be greatly appreciated. Thanks in advance!
Back to top
View user's profile Send private message
ed@searchfit
2


Joined: 27 Sep 2004
Posts: 1325

PostPosted: Thu Jul 12, 2012 6:49 am GMT    Post subject: Reply with quote

I have not added the Google Trusted Stores Code code to a SearchFit Thanks Page yet, but it may be possible by adding a SearchFit "Order Export Template".

For example, you could add the code you listed below to your Thanks Page, but the following modifications would be needed:

1. Enclose the code in the tags: <template_order>...</template_order>

2. Enclose the part of the code "<!-- start repeated item specific information -->" (only) with the tags: <foreach_item> ... </foreach_item>

3. Replace the items you marked in red with SearchFit keywords. The available SearchFit keywords can be found on these two pages:
a. http://www.searchfit.us.com/help/index.htm#hlp_template_storage_export_orders.html
b. http://www.searchfit.us.com/help/index.htm#hlp_thanks_page.html
For example:
First item you marked in red is "CUSTOMER_EMAIL".
You can find the corresponding SearchFit keyword on http://www.searchfit.us.com/help/index.htm#hlp_template_storage_export_orders.html (it is: ORDER_BILLING_EMAIL )

Please let me know if that works.
Back to top
View user's profile Send private message
dan
2


Joined: 29 Dec 2009
Posts: 33

PostPosted: Thu Jul 12, 2012 7:24 am GMT    Post subject: Reply with quote

Thank you for your help!

This is what we have so far, but we are missing the two variables highlighted in red.
Also, are the tags "template_order" and "foreach_item" placed correctly?
Will this work if we place it on the Thank You Page?


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

<template_order>

<!-- start order and merchant information -->
<span id="gts-o-id">SCART_ORDER_NUMBER</span>
<span id="gts-o-domain">www.fullspectrumsolutions.com</span>
<span id="gts-o-email">ORDER_BILLING_EMAIL</span>
<span id="gts-o-country">US</span>
<span id="gts-o-currency">USD</span>
<span id="gts-o-total">SCART_ORDER_AMOUNT_TOTAL_USDOLLAR</span>
<span id="gts-o-discounts">ORDER_PRICE_DISCOUNTS_ALL</span>
<span id="gts-o-shipping-total">ORDER_PRICE_SH</span>
<span id="gts-o-tax-total">ORDER_PRICE_TAX</span>
<span id="gts-o-est-ship-date">ORDER_EST_SHIP_DATE</span>
<span id="gts-o-has-preorder">Y</span>
<span id="gts-o-has-digital">N</span>
<!-- end order and merchant information -->

</template_order>

<!-- start repeated item specific information -->
<!-- item example: this area repeated for each item in the order -->

<foreach_item>

<span class="gts-item">
<span class="gts-i-name">ORDER_ITEM_NAME</span>
<span class="gts-i-price">ORDER_ITEM_PRICE</span>
<span class="gts-i-quantity">SCART_ORDER_QTY_TOTAL</span>
<span class="gts-i-prodsearch-id">ITEM_PRODUCT_SEARCH_ID</span>
<span class="gts-i-prodsearch-store-id">5950607</span>
<span class="gts-i-prodsearch-country">US</span>
<span class="gts-i-prodsearch-language">en</span>
</span>

</foreach_item>

<!-- end item 1 example -->
<!-- end repeated item specific information -->

</div>
<!-- END Trusted Stores -->
Back to top
View user's profile Send private message
main@searchfit
Site Admin
Site Admin


Joined: 23 Jan 2003
Posts: 7444
Location: California

PostPosted: Fri Jul 13, 2012 7:15 am GMT    Post subject: Reply with quote

Hi Dan,

First of all, make sure the skeleton of your template that you can use in the ThanksPage is:

<template_order>
<export_foreach_record>
...
<foreach_item>
...
</foreach_item>

</export_foreach_record>
</template_order>

With the pending SearchFit 8.28 sometime next week, you will be able to use the following addition in your template:

- ORDER_ITEM_ID : the id of the ordered item
- date(dateFormat, adjustDate) : the system date in the specified format

date() function Examples:
- date() : Jul 13, 2012; 10:11:12am PDT
- date(Y-m-d) : 2012-07-13
- date(Y-m-d, +1 day) : 2012-07-17
- date(Y-m-d, +7 days) : 2012-07-20
- date(Y-m-d, -1 day) : 2012-07-12

So you should be able to use:

ORDER_ITEM_ID as ITEM_PRODUCT_SEARCH_ID
and
time(Y-m-d, +7 days) as ORDER_EST_SHIP_DATE if your usual shipping estimate is 7 days after order is placed.

Please let me know if the above makes sense?
_________________
www.searchfit.com
www.searchfit.us.com


Last edited by main@searchfit on Mon Jul 16, 2012 5:51 am GMT; edited 2 times in total
Back to top
View user's profile Send private message
dan
2


Joined: 29 Dec 2009
Posts: 33

PostPosted: Mon Jul 16, 2012 2:31 am GMT    Post subject: Like this? Reply with quote

To confirm... Are the "template_order", "export_foreach_record" and "foreach_item" tags placed correctly? Thanks!


<!-- START Trusted Stores Order -->

<template_order>
<export_foreach_record>


<div id="gts-order" style="display:none;">

<!-- start order and merchant information -->

<foreach_item>

<span id="gts-o-id">SCART_ORDER_NUMBER</span>
<span id="gts-o-domain">www.fullspectrumsolutions.com</span>
<span id="gts-o-email">ORDER_BILLING_EMAIL</span>
<span id="gts-o-country">US</span>
<span id="gts-o-currency">USD</span>
<span id="gts-o-total">SCART_ORDER_AMOUNT_TOTAL_USDOLLAR</span>
<span id="gts-o-discounts">ORDER_PRICE_DISCOUNTS_ALL</span>
<span id="gts-o-shipping-total">ORDER_PRICE_SH</span>
<span id="gts-o-tax-total">ORDER_PRICE_TAX</span>
<span id="gts-o-est-ship-date">time(Y-m-d, +7 days)</span>
<span id="gts-o-has-preorder">Y</span>
<span id="gts-o-has-digital">N</span>

</foreach_item>

<!-- end order and merchant information -->

<!-- start repeated item specific information -->
<!-- item example: this area repeated for each item in the order -->

<foreach_item>

<span class="gts-item">
<span class="gts-i-name">ORDER_ITEM_NAME</span>
<span class="gts-i-price">ORDER_ITEM_PRICE</span>
<span class="gts-i-quantity">SCART_ORDER_QTY_TOTAL</span>
<span class="gts-i-prodsearch-id">ORDER_ITEM_ID</span>
<span class="gts-i-prodsearch-store-id">5950607</span>
<span class="gts-i-prodsearch-country">US</span>
<span class="gts-i-prodsearch-language">en</span>
</span>

</foreach_item>

<!-- end item 1 example -->
<!-- end repeated item specific information -->

</div>

</export_foreach_record>
</template_order>


<!-- END Trusted Stores -->


Last edited by dan on Mon Jul 16, 2012 2:41 am GMT; edited 1 time in total
Back to top
View user's profile Send private message
dan
2


Joined: 29 Dec 2009
Posts: 33

PostPosted: Mon Jul 16, 2012 2:40 am GMT    Post subject: Also... Reply with quote

There is also code that we need to put on every page of our site.
We will probably place it in the footer.

Do we need to add the "template_order", "export_foreach_record" and "foreach_item" before and after this piece of code too?

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

gts.push(["id", "61106"]);
gts.push(["google_base_offer_id", "ORDER_ITEM_ID"]);
gts.push(["google_base_subaccount_id", "5950607"]);
gts.push(["google_base_country", "US"]);
gts.push(["google_base_language", "en"]);

(function() {
var scheme = (("https:" == document.location.protocol) ? "https://" : "http://");
var gts = document.createElement("script");
gts.type = "text/javascript";
gts.async = true;
gts.src = scheme + "www.googlecommerce.com/trustedstores/gtmp_compiled.js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(gts, s);
})();
</script>
<!-- END: Google Trusted Store -->
Back to top
View user's profile Send private message
main@searchfit
Site Admin
Site Admin


Joined: 23 Jan 2003
Posts: 7444
Location: California

PostPosted: Mon Jul 16, 2012 5:54 am GMT    Post subject: Reply with quote

Your template was not correct, here is my suggested version. You need to test it when we release the next SF 8.28 in a week. Notice also, that we decided to use date(...) instead of time(...)

<!-- START Trusted Stores Order -->

<template_order>
<export_foreach_record>

<div id="gts-order" style="display:none;">

<!-- start order and merchant information -->

<span id="gts-o-id">SCART_ORDER_NUMBER</span>
<span id="gts-o-domain">www.fullspectrumsolutions.com</span>
<span id="gts-o-email">ORDER_BILLING_EMAIL</span>
<span id="gts-o-country">US</span>
<span id="gts-o-currency">USD</span>
<span id="gts-o-total">SCART_ORDER_AMOUNT_TOTAL_USDOLLAR</span>
<span id="gts-o-discounts">ORDER_PRICE_DISCOUNTS_ALL</span>
<span id="gts-o-shipping-total">ORDER_PRICE_SH</span>
<span id="gts-o-tax-total">ORDER_PRICE_TAX</span>
<span id="gts-o-est-ship-date">date(Y-m-d, +7 days)</span>
<span id="gts-o-has-preorder">Y</span>
<span id="gts-o-has-digital">N</span>

<!-- end order and merchant information -->

<!-- start repeated item specific information -->
<!-- item example: this area repeated for each item in the order -->

<foreach_item>

<span class="gts-item">
<span class="gts-i-name">ORDER_ITEM_NAME</span>
<span class="gts-i-price">ORDER_ITEM_PRICE</span>
<span class="gts-i-quantity">SCART_ORDER_QTY_TOTAL</span>
<span class="gts-i-prodsearch-id">ORDER_ITEM_ID</span>
<span class="gts-i-prodsearch-store-id">5950607</span>
<span class="gts-i-prodsearch-country">US</span>
<span class="gts-i-prodsearch-language">en</span>
</span>

</foreach_item>

<!-- end item 1 example -->
<!-- end repeated item specific information -->

</div>

</export_foreach_record>
</template_order>

<!-- END Trusted Stores -->
_________________
www.searchfit.com
www.searchfit.us.com
Back to top
View user's profile Send private message
main@searchfit
Site Admin
Site Admin


Joined: 23 Jan 2003
Posts: 7444
Location: California

PostPosted: Mon Jul 16, 2012 5:58 am GMT    Post subject: Reply with quote

For the code you need to put on every page. There are no keywords like ORDER_ITEM_ID, because your pages are not the checkout where these are available.

What is the purpose of this gts.push(["google_base_offer_id", "ORDER_ITEM_ID"]); on every page?
_________________
www.searchfit.com
www.searchfit.us.com
Back to top
View user's profile Send private message
dan
2


Joined: 29 Dec 2009
Posts: 33

PostPosted: Mon Jul 16, 2012 6:43 am GMT    Post subject: Reply with quote

This field is only a recommended field.

Originally called ITEM_PRODUCT_SEARCH_ACCOUNT_ID

It's for:

"Provide this field only if you submit feeds for Google Shopping. Account ID from Google Shopping. This value should match the account ID you use to submit your product data feed you submit to Google Shopping. (If you have an MCA account, use the subaccount ID associated with that product feed.)"

https://support.google.com/trustedstoresmerchant/bin/answer.py?hl=en&answer=2609894&ctx=go#Section1

Thanks for the suggested template.
Back to top
View user's profile Send private message
main@searchfit
Site Admin
Site Admin


Joined: 23 Jan 2003
Posts: 7444
Location: California

PostPosted: Mon Jul 16, 2012 6:50 am GMT    Post subject: Reply with quote

If you put the code in the product detailed template then you have the AUTO_GENERATED_PRODUCT_ID available, however the code will be available ONLY on the product detailed pages.

If you are not doing google base then you probably don't have to worry about this field.
_________________
www.searchfit.com
www.searchfit.us.com
Back to top
View user's profile Send private message
Boaterbarn
2


Joined: 08 Oct 2008
Posts: 442

PostPosted: Thu Jul 07, 2016 3:52 pm GMT    Post subject: Reply with quote

Hi guys,

I followed exact instruction for the same Google Trust store coding, but according to Google, if the code worked, it should have a box where customer can check the box to opt in the "purchase protection". That make me thinking this should show up before customer clicks on "finalize order" button right?

This is the exact Google instructions:

Complete test orders both as a guest and with a signed-in account, with a real email address. On the order confirmation page, click “Yes” to opt in for purchase protection. If you do not see the opt-in on the order confirmation page, this means the order confirmation module code is not detected by Google. Review any error messages on the yellow bar

Thanks so much for your help

Don D.
_________________
<b>Boater Barn</b>
http://www.boaterbarn.com/
Back to top
View user's profile Send private message
Boaterbarn
2


Joined: 08 Oct 2008
Posts: 442

PostPosted: Thu Jul 07, 2016 3:54 pm GMT    Post subject: Reply with quote

Just to clarify,

I did place the test order and I didn't see any opt in box from Google at all at the Thanks page (where the above codes located at)

Any help is greatly appreciated

Don D.
_________________
<b>Boater Barn</b>
http://www.boaterbarn.com/
Back to top
View user's profile Send private message
Boaterbarn
2


Joined: 08 Oct 2008
Posts: 442

PostPosted: Thu Jul 07, 2016 4:26 pm GMT    Post subject: Reply with quote

Figured out now and worked!

In order for those codes from Google to work, it needed a javascript to pick up those var and submit to google.

Thanks guys!

Don D.
_________________
<b>Boater Barn</b>
http://www.boaterbarn.com/
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.searchfit.com Forum Index -> SearchFit Questions and Suggestions All times are GMT - 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum