Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

session variables in checkout_success


Recommended Posts

Hope I'm in the right section here B)


I wanted to get sort of "Thank you $order->customer['Name'] for placing your order. . . bla, bla, bla on checkout_success.


So I see that the variables created in checkout_process don't get unregistered there and thought I have a go and use them in checkout_success.

application_bottom closes the session and application_top starts the session again so I should have it available, I reckoned.


Bummer, won't work. But can't figure out why.


Would be thankful for some suggestion on how to forward/make available that variables to checkout_success so that I can unregister them there if need be.


Can't be too difficult, can it ? :rolleyes:




Link to comment
Share on other sites

While waiting for an helping answer it came to my mind that it was important for anyone to help what system my shop is made of :P


Well, here it goes:



mysql 4.0.15

apache 1.3.26

For SSL I'm using a ssl-proxy


Did I forget something else?

Link to comment
Share on other sites

Why not just change (around line 277 of checkout_process.php)

  tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));

to include the variables you need? E.g.

  tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'name=' . $order->customer['Name'], 'SSL'));



Link to comment
Share on other sites

Well, this didn't really work for me.


When I put somewhere [to stay with that example) on checkout_success

echo print_r($name);

to see what happens, it gives only




You see I'm not quite that sort of programmer you might hope I am.

To be honest, it's magic to me and I'm trying to get around whith shoving variables around that others define :)

But I'm learning.

Link to comment
Share on other sites

Try replacing $order->customer['Name'] with

$order->customer['firstname'] . ' ' . $order->customer['lastname']




P.S. For future compatibility, you might want to replace $name with $_GET['name']

Link to comment
Share on other sites


I did it with the proper variables.

I only used $name as example cause I'm too lazy to type :rolleyes:


Only the "true" as result is original.


Or is "true" just a hint that I need to use the right command to let the script reveal the "real" content?

But that's what print_r is for, right?


Is there no other way to keep certain variables for use on that page to unregister them there?

Or is there a security problem with it.




Link to comment
Share on other sites

$order is not registered in the session. You can move the $cart->reset(true); to checkout_success.php to preserve the cart info if you want.




Link to comment
Share on other sites

  • 2 weeks later...


This topic is now archived and is closed to further replies.

  • Create New...