Forums / General Questions / variable $_SESSION['payment'] suddenly disappeared from checkout_success page

variable $_SESSION['payment'] suddenly disappeared from checkout_success page

Views: 470

Results 1 to 3 of 3
8 Sep 2014, 3:00 PM
#1
lash avatar

lash

New Zenner

Join Date:
Jan 2013
Posts:
4
Plugin Contributions:
0

variable $_SESSION['payment'] suddenly disappeared from checkout_success page

I just created a function which used the $_SESSION['payment'] variable to display some texxt if it a certain payment.
But suddenly it didn't work :/
I checked the content of the $_SESSION['payment'] variable, but it was null.

Can someone help why that happend ?, or tell another way I can get what kind of payment my customer using?

I'm running zen cart 1.5.1

/LasH

8 Sep 2014, 5:46 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: variable $_SESSION['payment'] suddenly disappeared from checkout_success page

$_SESSION['payment'] is indeed null at the checkout_success page, because payment is already completed and done.

Better to use $order_summary['payment_module_code'] instead, as per: http://www.zen-cart.com/content.php?322-Integrating-Sales-Analytics-and-Affiliates-Tools

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Sep 2014, 9:52 AM
#3
lash avatar

lash

New Zenner

Join Date:
Jan 2013
Posts:
4
Plugin Contributions:
0

Re: variable $_SESSION['payment'] suddenly disappeared from checkout_success page

Okay, maybe some chache was used when I programmed it.

but I dont have that variable. I have just printed the variable out using var_dump and got this:
["order_number"]=> int(90)
["order_subtotal"]=> float(50000)
["credits_applied"]=> int(0)
["order_total"]=> float(50000)
["commissionable_order"]=> float(50000)
["commissionable_order_formatted"]=> string(18) "50.000,00 EUR"
["coupon_code"]=> NULL