Forums / General Questions / Session Var's outside store

Session Var's outside store

Locked

Started by w_lamoreaux on 30 Aug 2006, 1:26 AM · Views: 1,413

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
30 Aug 2006, 1:26 AM
#1
w_lamoreaux avatar

w_lamoreaux

New Zenner

Join Date:
Aug 2006
Posts:
11
Plugin Contributions:
0

Session Var's outside store

I have my store in a directory https://www.mywebsite.com/rockstore
but my main website https://www.mywebsite.com/index.php i would like check to see if the person is logged into zencart.

i noticed the login/logout and my account uses this line of code

<? if (isset($_SESSION['customer_id'])) { ?>

but when i put that line of code into my main index.php it doesn't see that there is any existing session var's

i did print_r($_session); and there is no session var's when i do print_r from my main index.php but when i put print_r into my /rockstore/index.php it has this whole list of session vars.

can anyone point me in the right direction of what files i need to "include" and what not so that my main index.php i can check to see if the person is logged into zen cart.

thanks

30 Aug 2006, 1:41 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Session Var's outside store

You'll have to include includes/application_top.php

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

30 Aug 2006, 2:04 AM
#3
w_lamoreaux avatar

w_lamoreaux

New Zenner

Join Date:
Aug 2006
Posts:
11
Plugin Contributions:
0

Re: Session Var's outside store

alright i put that in my main index.php and it says

Not Found
The requested URL /~paradigm/zc_install/index.php was not found on this server.

sorry.

30 Aug 2006, 2:42 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Session Var's outside store

true enough ... Zen Cart is designed to be run directly, not remotely. Thus all its paths are relative, and not absolute.
That error indicates it cannot find the configure.php files where it was looking.

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

30 Aug 2006, 3:07 AM
#5
w_lamoreaux avatar

w_lamoreaux

New Zenner

Join Date:
Aug 2006
Posts:
11
Plugin Contributions:
0

Re: Session Var's outside store

so then is there "any" way i can do what i mentioned above?

30 Aug 2006, 5:34 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: Session Var's outside store

If the files you're trying to run it from can be run from within the Zen Cart folder, it may be simpler, since Zen Cart is built around using relative paths, not absolute paths, to access its files.

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

30 Aug 2006, 5:35 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: Session Var's outside store

Or you could just hack apart all the sessions functionality from within Zen Cart to duplicate it outside the cart... which can be an ugly process if you're not well-versed in PHP session coding.

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