AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Partners
5K members online now
5K members online now
Ask questions about badging, the Partners portal, and anything related to your Partners account.
Guide Me
star_border
Reply

Google Trusted Stores with Shopify Plus

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm trying to integrate GTS with a Shopify Plus account and having some difficulty specifying a shipping date within the <span id="gts-o-est-ship-date"></span> element.

 
I've attached a script below which adds a date 5 days from now to the <span id="gts-o-est-ship-date"></span> element and also creates an alert popup with this date.
 
The script seems to work correctly in a typical html page. But If I try to use that code on the checkout page (in Shopify's additional scripts checkout settings) the alert works, but the <span id="gts-o-est-ship-date"></span> element isn’t updated. Does anyone have any experience integrating this with Shopify or have any ideas how I might specify a shipping date?
 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" type="text/javascript"></script>

<span id="gts-o-est-ship-date"></span>
<!-- Create Shipping and Delivery Dates -->
<script>
	$(document).ready(function(){

		Date.prototype.addDays = function(days)
		{
			var dat = new Date(this.valueOf());
			dat.setDate(dat.getDate() + days);
			return dat;
		}

		// Create shipping and delivery dates
		var dat = new Date();
		var shipDate = dat.addDays(5);

		// Format shipping date
		function formattedShipDate(date) {
			var d = shipDate,
			month = '' + (d.getMonth() + 1),
			day = '' + d.getDate(),
			year = d.getFullYear();

			if (month.length < 2) month = '0' + month;
			if (day.length < 2) day = '0' + day;

			return [day, month, year].join('/');
		}

		// Add dates to form
		alert(shipDate);
		
		// Add dates to form
		$( "#gts-o-est-ship-date" ).html(shipDate);
	});
</script>  
1 Expert replyverified_user

Re: Google Trusted Stores with Shopify Plus

Top Contributor
# 2
Top Contributor

Hey @Tim D

I did some digging around, I see you have asked in all the right places. I ran a test on the script http://www.csgnetwork.com/htmlcodetest.html and it produced the desired outcome.

 

 11.JPG

 

Did you get any responses in the University forum? 


Spencer Wade, AdWords, G+ & WebSearch Platinum Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here
Find me on: Google+ | Twitter | Directory | Partner

Google Trusted Stores with Shopify Plus

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi @Spencer_Wade

 

Thanks for the quick reply. Yes I've tried both the Shopify University forums and Shopify's support but haven't been able to get a response from the forums and Shopify's support have spent some time trying to find a solution for but they haven't been able to find an answer unfortunately. Shopify suggested I try asking in Google's forums so thats where I'm at : )

 

Google Trusted Stores with Shopify Plus

Top Contributor
# 4
Top Contributor

Ah snap, sorry for the delay here, @Tim D all relevant searches point back to people asking the question or yours. 

I would suggest reaching out directly to Google Merchant Center Help click the contact us tab top right and see if you can get someone to look at your issue.  Even though I am thinking they may not be able to help with output issue, it would seem that Shopify would be the one. I know Jon Gritton is the expert in situations like this but with a Shopify account, I am unsure. 

Few posts I found that might help get the output correct are: Datejs & How to display an estimated delivery date (Dated)

I also tested changing alert(shipDate); to alert(shipDate) + 4; and it still produced the output via html, not sure if it worth testing to see. Seems like you have been trying to get to resolution for weeks now, it amazes me others are not having this issue.


Spencer Wade, AdWords, G+ & WebSearch Platinum Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here
Find me on: Google+ | Twitter | Directory | Partner

Google Trusted Stores with Shopify Plus

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Definitely having the same trouble.  I'll reach out to Plus support and update the thread if I learn something new

 

Google Trusted Stores with Shopify Plus

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Just to update the thread.  Shopify Plus support still has no idea.

Google Trusted Stores with Shopify Plus

Top Contributor
# 7
Top Contributor

Hey @Kaine K

I am sure you did see it but there seems to be a place to request the integration, might be dated, but wanted to see if this would help!


Spencer Wade, AdWords, G+ & WebSearch Platinum Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here
Find me on: Google+ | Twitter | Directory | Partner

Google Trusted Stores with Shopify Plus

[ Edited ]
Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

Hi @Kaine K

Sorry for the slow reply! I did eventually develop a solution for this. The code below adds 3 days to the current date with liquid:

 
{{'now' | date: "%s" | plus : 259200 | date: "%Y-%m-%d" }}
  
Just note that GTS has now merged into Google Customer Reviews in many countries:
 
"Trusted Stores migrated into Merchant Center for customers in Australia, France, Germany, Japan, United States, and the United Kingdom and was rebranded as Google Customer Reviews. GCR is also now available for all retailers in those countries."

Google Trusted Stores with Shopify Plus

Top Contributor
# 9
Top Contributor

Thanks for rounding back with a solution....Congrats on getting this done. @Tim D


Spencer Wade, AdWords, G+ & WebSearch Platinum Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here
Find me on: Google+ | Twitter | Directory | Partner