Jump to content

Prestashop order details on order confirmation page.


jonathancook

Recommended Posts

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 by jonathancook (see edit history)
Link to comment
Share on other sites

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 by jonathancook (see edit history)
Link to comment
Share on other sites

  • 1 year later...

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

  • 7 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...