Forums / General Questions / Google Chrome with Cookies Disabled

Google Chrome with Cookies Disabled

Locked

Views: 1,167

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
23 Nov 2010, 1:54 AM
#1
dcdc avatar

dcdc

New Zenner

Join Date:
Feb 2008
Posts:
71
Plugin Contributions:
0

Google Chrome with Cookies Disabled

Greetings,

I have a client running Zencart 1.3.9.f who is reporting issues with some of his customers who run Google Chrome and have their cookies disabled/blocked (specifically corporate settings where a firewall is involved). Client's site is http://beadsdirectusa.com.

Clients can perform all functions on the site, including checkout without cookies enabled, however, if they click on "Home", it logs them out and they lose their session. Logging back into their account seems to permit them to resume shopping.

Client sent me this link:
http://zencart.posterous.com/troubleshooting-login-related
and wants me to change the code seen there to fix the problem, however, I wanted to run this by all of you first before attempting the code change.

Look forward to hearing any responses.

Christopher

23 Nov 2010, 2:09 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Google Chrome with Cookies Disabled

Beware using advice from other websites, especially with dated posts.

If your problem is your Home link, change the link in your tpl_header.php file to <?php echo zen_href_link(FILENAME_DEFAULT); ?> instead of <?php echo HTTP_SERVER . DIR_WS_CATALOG; ?>

The link won't be as pretty, but if your customers can't use contemporary settings, you'll have to do that.

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

23 Nov 2010, 4:19 AM
#3
dcdc avatar

dcdc

New Zenner

Join Date:
Feb 2008
Posts:
71
Plugin Contributions:
0

Re: Google Chrome with Cookies Disabled

Hello Dr. Byte,

Thanks for taking the time to answer my question. I was able to get the code in proper syntax for the Home link, and successfully tested it. However, I need a hand figuring out the syntax for the following line of code for the logo which links back to the home page.

The line of code originally was:

     <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>

I changed the syntax as follows:

    <div id="logo"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?> . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . "</a></div>

However, the logo no longer shows at the top of the screen. I'll keep working the code, but if you or anyone can figure out what I did wrong and can lend a hand, I'd appreciate it.

Thank you again!

Christopher

23 Nov 2010, 4:30 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Google Chrome with Cookies Disabled

Remove the extraneous ?> in ```
...DEFAULT); [B]?>[/B] . zen_image(

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

23 Nov 2010, 5:16 AM
#5
dcdc avatar

dcdc

New Zenner

Join Date:
Feb 2008
Posts:
71
Plugin Contributions:
0

Re: Google Chrome with Cookies Disabled

Hello again, Dr. Byte,

Well, I must still be doing something wrong. If I remove that one, then I don't terminate the php script anywhere in that line.

I was able to get the header to reappear using the following code, and the header links, but not correctly (it tries linking to: http://www.beadsdirectusa.com/%3C?php%20echo%20zen_href_link%28FILENAME_DEFAULT%29;%20?%3E). Here is the new code:

    <div id="logo"><?php echo '<a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>

Perhaps my issue is trying to echo twice within the line, but I'm not entirely certain.

Thanks again... hopefully this is the last time I'll need to bug you on this issue.

Christopher

23 Nov 2010, 5:24 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: Google Chrome with Cookies Disabled

Semi-colon too.

     <div id="logo"><?php echo '<a href="' . [B]zen_href_link(FILENAME_DEFAULT)[/B] . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>

NOTE: The above code is VERY version-specific. Copying this to another template/version may cause problems. Be SURE you know what you're doing when hacking about with the code!*

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

23 Nov 2010, 5:33 AM
#7
dcdc avatar

dcdc

New Zenner

Join Date:
Feb 2008
Posts:
71
Plugin Contributions:
0

Re: Google Chrome with Cookies Disabled

Dr. Byte,

Thank you very much for your help! :hug:

Chirstopher