huggettm Posted October 24, 2017 Share Posted October 24, 2017 https://support.google.com/merchants/answer/7106244?hl=en Trying to add this to CC6, can anyone help. I need to output this with the values in red from the store, I am unsure how to call them from CC6, also how to output the date as we do not give delivery dates, so it would need to be generated in say 4 days from the date of purchase: ******************************************* <!-- BEGIN GCR Opt-in Module Code --> <script src="https://apis.google.com/js/platform.js?onload=renderOptIn" async defer> </script> <script> window.renderOptIn = function() { window.gapi.load('surveyoptin', function() { window.gapi.surveyoptin.render( { // REQUIRED "merchant_id":"MERCHANT_ID", "order_id": "ORDER_ID", "email": "CUSTOMER_EMAIL", "delivery_country": "COUNTRY_CODE", "estimated_delivery_date": "YYYY-MM-DD", // OPTIONAL "opt_in_style": "OPT_IN_STYLE" }); }); } </script> <!-- END GCR Opt-in Module Code --> ******************************************* Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 24, 2017 Share Posted October 24, 2017 {literal} <!-- BEGIN GCR Opt-in Module Code --> <script src="https://apis.google.com/js/platform.js?onload=renderOptIn" async defer> </script> <script> window.renderOptIn = function() { window.gapi.load('surveyoptin', function() { window.gapi.surveyoptin.render( { // REQUIRED "merchant_id":"YOUR MERCHANT ID PROVIDED BY GOOGLE", "order_id": "{/literal}{$SUM.cart_order_id}{literal}", "email": "{/literal}{$SUM.email}{literal}", "delivery_country": "{/literal}{$SUM.country_d}{literal}", "estimated_delivery_date": "{/literal}{"+2 days"|date_format:"%d-%m-%Y"}{literal}", // OPTIONAL "opt_in_style": "OPT_IN_STYLE" }); }); } </script> <!-- END GCR Opt-in Module Code --> {/literal} Try something like this.. the date bit may need work as I haven't tested it. Reference: https://www.smarty.net/forums/viewtopic.php?p=64359 Alternatively you can use JavaScript to get a date x amount of days in the future. The merchant_id is provided by Google right? So you can hard code that value in. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted October 24, 2017 Share Posted October 24, 2017 delivery country will not be the required ISO value Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 24, 2017 Share Posted October 24, 2017 Just now, Noodleman said: delivery country will not be the required ISO value Yeah probably. Quote Link to comment Share on other sites More sharing options...
huggettm Posted October 24, 2017 Author Share Posted October 24, 2017 thank you, I have tried adding this to confirmed.inc.php but it doesnt show on a test order, is there another file for the order confirmation page: storeurl/index.php?_a=complete Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 25, 2017 Share Posted October 25, 2017 Hi Mark, Sorry for the delay here. I've just been stuck at hospital for a few hours. Nothing important. You'll need to add the code to the content.receipt.php file which is the page shown to the customer after payment has been made. Quote Link to comment Share on other sites More sharing options...
huggettm Posted October 25, 2017 Author Share Posted October 25, 2017 thank you, i can see it in the source code on the order confirmation now, but it does not load anything on the page - any ideas? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 27, 2017 Share Posted October 27, 2017 Is it supposed to popup a survey window? Sounds like it. Can you check the console log for any errors? Also check in your Google account if it needs to be turned on or configured at all. Quote Link to comment Share on other sites More sharing options...
huggettm Posted October 27, 2017 Author Share Posted October 27, 2017 yes, it should load like this https://support.google.com/merchants/answer/7124322 nothing in the error logs Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 30, 2017 Share Posted October 30, 2017 Any progress? Quote Link to comment Share on other sites More sharing options...
huggettm Posted October 31, 2017 Author Share Posted October 31, 2017 nope Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 31, 2017 Share Posted October 31, 2017 Do Google have any tech support at all? You'd think one of the biggest companies in the world would have staff to help? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted October 31, 2017 Share Posted October 31, 2017 Google's "help" is a joke. Quote Link to comment Share on other sites More sharing options...
huggettm Posted November 7, 2017 Author Share Posted November 7, 2017 no, they just said to make sure the code is correct Quote Link to comment Share on other sites More sharing options...
huggettm Posted November 8, 2017 Author Share Posted November 8, 2017 i cant be the only person trying to implement this? Quote Link to comment Share on other sites More sharing options...
mg3ddesign Posted March 14, 2018 Share Posted March 14, 2018 I'm trying to implement this as well. Did anyone figure it out? Quote Link to comment Share on other sites More sharing options...
huggettm Posted March 14, 2018 Author Share Posted March 14, 2018 I have the code displaying as i believe it should, but the opt in box does not load for me. I have added it to the requests suggestions - google reviews are an integral part of google shopping now so this should be included Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.