Jump to content

PayPal order-confirmation and vars lost


Elisa Testino

Recommended Posts

Hello, I'm Elisa, a junior developer and I'm passionate to Prestashop and I've a problem.

 

PayPal plugin don't redirect to order-confirmation page but to $page_name == 'module-paypal-submit', i have a dynamic tracking code to put on header.php

 

With che code

{if $page_name == 'order-confirmation'}
this code work
 
$_Trk.d.uoc = "{/literal}{$id_order}{literal}";  // Unique order ID generated by your system (text)
        $_Trk.d.odc = "{/literal}{$ship_order}{literal}";  // Delivery cost of the order (number)

$id_order and $ship_order working, with

{if $page_name == 'order-confirmation' || $page_name == 'module-paypal-submit'}

on $page_name == 'module-paypal-submit' load static code but not the dynamic vars

 

How can i resolve this problem?

 

Thanks.

 

Link to comment
Share on other sites

  • 8 months later...

While I was searching for sth else I bumped on your post.

Maybe it's a bit late, but for your vars problem I think the best way is to show them at your header.tpl file and not header.php.

For that you should include them in your controller if you want them to be read at the confirmation page.

 

A more analytical question was made a while ago for affiliate tracking code 

https://www.prestashop.com/forums/topic/250595-solved-affiliate-tracking-code/

 

I gave a solution for paypal module in page 7, where it get its variables from its own controller rather than OrderConfirmationController

https://www.prestashop.com/forums/topic/250595-solved-affiliate-tracking-code/?p=2046732

Edited by joss54 (see edit history)
Link to comment
Share on other sites

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...