Forums / General Questions / Where is $_SESSION['customer_id'] being set?

Where is $_SESSION['customer_id'] being set?

Views: 839

Results 1 to 5 of 5
31 Jul 2012, 5:50 PM
#1
jrcook416 avatar

jrcook416

New Zenner

Join Date:
Jul 2012
Posts:
45
Plugin Contributions:
0

Where is $_SESSION['customer_id'] being set?

Good day and hello, everyone;

After the last hour of looking through the documentation, I am having trouble locating where exactly $_SESSION['customer_id'] is being set.

The reason that I am asking is this - I have a need to to query the customer's address book based upon a different variable, so to minimize hacking and breaking, I essentially want to go set $_SESSION['agency_id'] to be based upon a different value pulled from the customer's table and then go back and have the address book query based upon that value. I would like to do that right below where $_SESSION['customer_id'] is being set.

The supporting code has not been written as of yet; but the pseudocode is as follows:

Customer logs in, customer's agency key is pulled from the customer's table and loaded into the session variable, at checkout, customer's address book is loaded based upon the agency query and customer selects which location within said agency he or she wants his or her order delivered to.

Regards,

Jeremiah

31 Jul 2012, 6:19 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Where is $_SESSION['customer_id'] being set?

includes/modules/pages/login/header_php.php

Nick
iszent.com

31 Jul 2012, 7:00 PM
#3
jrcook416 avatar

jrcook416

New Zenner

Join Date:
Jul 2012
Posts:
45
Plugin Contributions:
0

Re: Where is $_SESSION['customer_id'] being set?

Thank you very much :-) My modifications work extremely well.

Regards,

Jeremiah

31 Jul 2012, 9:00 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Where is $_SESSION['customer_id'] being set?

It would be most efficient if your modifications were to hook the notifier point which occurs after that variable has been set. That way you don't have to change any core code, since they would be told to run only when that notifier event is triggered.

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

1 Aug 2012, 12:36 PM
#5
jrcook416 avatar

jrcook416

New Zenner

Join Date:
Jul 2012
Posts:
45
Plugin Contributions:
0

Re: Where is $_SESSION['customer_id'] being set?

Excellent. I will get that accomplished before I roll to production. Thank you for your suggestion :-)