Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading from 1.3.x to 1.3.9 / Session info not updating for scripts outside of ZC folder after upgrade to 1.39

Session info not updating for scripts outside of ZC folder after upgrade to 1.39

Locked

Started by steel_track on 9 May 2010, 11:03 PM · Views: 1,060

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
9 May 2010, 11:03 PM
#1
steel_track avatar

steel_track

New Zenner

Join Date:
May 2010
Location:
Denver
Posts:
3
Plugin Contributions:
0

Post #1 by steel_track

I have Zen Cart installed to the directory /products/ of a website, and to display log in, log off, my account, shopping cart links, or whatever else outside of that folder, I used the following code:

<?php $qcd = getcwd(); chdir($_SERVER['DOCUMENT_ROOT'].'/products'); require_once('includes/application_top.php'); chdir($qcd); ?>

With Zen Cart 1.38a, if I logged into an account or added something to the shopping cart, the links would update like they normally would inside of the Zen Cart installation folder.

However, I just upgraded to Zen Cart 1.39b and the links are no longer updating correctly. If I add something to my cart, it displays correctly inside of the /products/ directory, but not outside of it using the code that worked with 1.38a. Also, if I log in, the links do not update to show "my account" and "log off".

I am guessing that 1.39b handles sessions a little differently and that I need to call additional functions or something like that, but I honestly have no idea where to start on this one.

Any help is much appreciated!

14 May 2010, 11:16 PM
#2
steel_track avatar

steel_track

New Zenner

Join Date:
May 2010
Location:
Denver
Posts:
3
Plugin Contributions:
0

Post #2 by steel_track

It's been a few days and I still haven't had any ideas.

The one idea I have is that it has something to do with the new handling of htaccess files. Can anybody help me in this one?

15 May 2010, 2:27 AM
#3
drbyte avatar

drbyte

Sensei

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

Post #3 by drbyte

It's likely because Zen Cart is setting more specific session cookies as part of stronger security. Thus your attempts to change store content are being ignored because they're not part of the customer's active session.

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

15 May 2010, 5:34 AM
#4
steel_track avatar

steel_track

New Zenner

Join Date:
May 2010
Location:
Denver
Posts:
3
Plugin Contributions:
0

Post #4 by steel_track

Thanks for the reply Dr. Byte!

I was thinking it might be something like that, but it doesn't sound like something that has a sensible workaround either.

I guess this means I will have to move onto a more general CMS for sites requiring more functionality than just e-commerce.

Thanks again!