21491 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 861 Views |
-
Session::set set on one page, missing on the next

10 November 2009 at 3:11pm
Hi all
OK here's my process
1. Checkout form on a heavily modified ecommerce module user fills out form, whose action is set to controller processPayment method.
2. Among other things, this method does this ($data being the submitted form data):
Session::set('orderForm.'.$cart->ID, $data);
If I output this right after this call with Session::get('orderForm.'.$cart->ID);, all is fine and as expected.3. User is redirected to 3rd party secure credit card processing. On success, they are sent back to another page where the response is handled by the processOrder controller method.
It is at this point where Session::get('orderForm.'.$cart->ID); returns nothing. Yes I have outputted $cart->ID to check that holds the correct value.
I have also outputted the entire $_SESSION and the item I set in 2. is not present.
Any ideas? What is the scope of these Session objects? Has the '.' after orderForm got anything to do with it?
Ta
Aaron -
Re: Session::set set on one page, missing on the next

10 November 2009 at 5:44pm
Stuff it. I used $_SESSION instead. It works.
Aaron
-
Re: Session::set set on one page, missing on the next

25 February 2013 at 11:40pm
my colleague got the same problem and have to use _SESSION at the end.
does it mean there is problem with Session::set method??
| 861 Views | ||
|
Page:
1
|
Go to Top |


