jonathancook Posted January 24, 2014 Share Posted January 24, 2014 (edited) Hello, I'm looking at adding Google Analytics e-commerce tracking to prestashop. However after looking into it I am unsure how to pass the order details (order ID, reference, product name, unit price, quantity etc). Is there a way to easily pass the data to the order_confirmation.tpl file? I found it strange that the order confirmation page doesn't display this data by default to the end user anyway. Any advice or point in the right direction will be great, thank you. p.s using PrestaShop 1.5.6.2 Edited January 24, 2014 by jonathancook (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 24, 2014 Share Posted January 24, 2014 i think that this will be useful in this case: http://www.prestashop.com/forums/topic/250595-solved-affiliate-tracking-code/ Link to comment Share on other sites More sharing options...
jonathancook Posted January 24, 2014 Author Share Posted January 24, 2014 (edited) Hi Thanks for your reply. I'm using stripe's payment module so my order_confirmation.tpl is slightly different to the default will adding {Tools::getvalue('id_order')} to this template still call the order ID my order_confirmation.tpl: {if $stripe_order.valid == 1} <div class="conf confirmation">{l s='Congratulations, your payment has been approved and your order has been saved under the reference' mod='stripejs'} <b>{$stripe_order.reference|escape:html:'UTF-8'}</b>.</div> {else} {if $order_pending} <div class="error">{l s='Unfortunately we detected a problem while processing your order and it needs to be reviewed.' mod='stripejs'}<br /><br /> {l s='Do not try to submit your order again, as the funds have already been received. We will review the order and provide a status shortly.' mod='stripejs'}<br /><br /> ({l s='Your Order\'s Reference:' mod='stripejs'} <b>{$stripe_order.reference|escape:html:'UTF-8'}</b>)</div> {else} <div class="error">{l s='Sorry, unfortunately an error occured during the transaction.' mod='stripejs'}<br /><br /> {l s='Please double-check your credit card details and try again or feel free to contact us to resolve this issue.' mod='stripejs'}<br /><br /> ({l s='Your Order\'s Reference:' mod='stripejs'} <b>{$stripe_order.reference|escape:html:'UTF-8'}</b>)</div> {/if} {/if} EDIT: I have tried this and it works, I get the order ID echoed. However is there a list of all of the calls for the different things I need for the e-commerce tracking anywhere? Edited January 24, 2014 by jonathancook (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 24, 2014 Share Posted January 24, 2014 everything depends what kind of your tracking system, some of them needs other params to provide with google analytics, you can provide: - order id - order value - order currency it will be enough Link to comment Share on other sites More sharing options...
AZC Posted February 5, 2015 Share Posted February 5, 2015 Hello, I'm looking at adding Google Analytics e-commerce tracking to prestashop. However after looking into it I am unsure how to pass the order details (order ID, reference, product name, unit price, quantity etc). Is there a way to easily pass the data to the order_confirmation.tpl file? I found it strange that the order confirmation page doesn't display this data by default to the end user anyway. Any advice or point in the right direction will be great, thank you. p.s using PrestaShop 1.5.6.2 I'm wondering if this helped? i am trying to show the order details on the confirmation page. Like you say, I dont know why this doesnt happen by default. Thanks Link to comment Share on other sites More sharing options...
renadena007 Posted February 24, 2022 Share Posted February 24, 2022 (edited) hi vekia this solution work for prestahsop v1.6 ?? thanks Edited February 24, 2022 by renadena007 (see edit history) 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