grandall1069 Posted May 12, 2017 Share Posted May 12, 2017 (edited) Hi Guys, I need to add some code to my order confirmation page for Google customer review opt in, shown below. Can someone tell me what file I should be adding it to. I have tried the order_confirmation.tpl with no luck Thanks in advance <script src="#ttps://apis.google.com/js/platform.js?onload=renderOptIn" async defer></script><script>window.renderOptIn = function() {window.gapi.load('surveyoptin', function() {window.gapi.surveyoptin.render({"merchant_id": 000000000,"order_id": "ORDER_ID","email": "CUSTOMER_EMAIL","delivery_country": "COUNTRY_CODE","estimated_delivery_date": "YYYY-MM-DD"});});}</script> Edited May 12, 2017 by grandall1069 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted May 13, 2017 Share Posted May 13, 2017 You need to edit the orderConfirmationController, and add the parameters to the template, first.Delivery date should be more or less the time it usually takes for you to deliver goods.If it's variable, you will have to consider the shipping time for each carrier. Link to comment Share on other sites More sharing options...
bellini13 Posted May 13, 2017 Share Posted May 13, 2017 the correct way is to create a module that would hook the orderConfirmation event. the module would be responsible for setting the 4 values you need, and then displaying the content on the order confirmation page. The first 3 values should be fairly easy to obtain "order_id": "ORDER_ID", "email": "CUSTOMER_EMAIL", "delivery_country": "COUNTRY_CODE", However delivery date does not exist in core Prestashop, are you using a module or customization for this? "estimated_delivery_date": "YYYY-MM-DD" Link to comment Share on other sites More sharing options...
NemoPS Posted May 15, 2017 Share Posted May 15, 2017 @bellini it seems like that google ads script requires an estimated delivery date Link to comment Share on other sites More sharing options...
bellini13 Posted May 15, 2017 Share Posted May 15, 2017 @nemops, I assume it does too, however my question is not about the google ad script, it is about Prestashop. Prestashop does not capture an estimated delivery date in core, so I'm wondering how they have added that to Prestashop. Link to comment Share on other sites More sharing options...
grandall1069 Posted May 15, 2017 Author Share Posted May 15, 2017 Hi Guys, Thanks for the responses. I think the estimated delivery capture or lack of it is going to be a real problem. The code above is provided by google and you change the variables to suit. 1 step forward 2 steps back Link to comment Share on other sites More sharing options...
NemoPS Posted May 15, 2017 Share Posted May 15, 2017 If you don't need it excessively complex, you can simply add more or less your carrier's delivery time (say, the maximum) to the current date 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now