Zen Cart Logo
Forums / General Questions / Mac Safari sessions problem

Mac Safari sessions problem

Views: 2,359

Results 1 to 3 of 3
11 Mar 2011, 3:22 PM
#1
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Mac Safari sessions problem

My understanding with sessions is since this is server side code that the sessions should work across all browsers. I have a client on Mac Safari whose sessions keeps dropping out in certain places. For example is the shopping cart in the header. If he adds something to the cart, the items appear in the header. When he clicks on a hard coded header link for example, his cart is empty. I assume this is a session problem. It is not happening on the PC.

This has also happened to him with something in admin where a separate window is opened on one link.

Can Safari Mac have some sort of way to configure sessions that he might have turned off? Can hard coding of links cause sessions to end?

12 Mar 2011, 6:49 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Mac Safari sessions problem

I doubt it's anything specific to Mac / Safari.

It's likely that you've got hard-coded links that aren't properly formed. They should be generated with zen_href_link() in the same way that they were in the original ZC templates, not directly coded as an A HREF. That way things can be adjusted automatically if for example a session ID needs to be attached due to something unique to how the user has configured their browser.

Also remember that surfing with Privacy Mode ('private browsing') enabled will prevent session cookies from working properly, thus typically preventing logins and shopping.

12 Mar 2011, 11:58 AM
#3
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Mac Safari sessions problem

Yeah, these are really hard-coded due to some php requirements done by the last developer. I'll let the site owner know and stick that one in my toolkit with a do not use sticker.

The main thing on those links that are a problem is the requirement that the current page link be highlighted when on the page. The last fellow figured out how to make it happen with php.

I see that as a function highlighted frequently by graphic designers so I'm sure I'll run in to it again.

It's akin to the bolding of the links in the categories menu so there's already a similar function buried somewhere in the code. Care to direct me to it? Perhaps I can develop something that works for other menus.