Zen Cart Logo
Forums / General Questions / v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

Views: 690

Results 1 to 11 of 11
3 Apr 2021, 9:31 PM
#1
toomuchmusic avatar

toomuchmusic

New Zenner

Join Date:
Oct 2014
Location:
Massachusetts, United States
Posts:
21
Plugin Contributions:
0

v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

Running into a maddening situation that we haven't been able to track down. On our site, https://www.oldpatterns.com, some customers report that they can't see any items in their shopping carts. In some cases, switching browsers fixes the problem.

Personally, if I use Chrome or Firefox on certain macs, I see the following behavior, but everything seems to be OK if I switch to incognito mode or use Safari:

  1. Log In
  2. Add an arbitrary item to my shopping cart
  3. Click on the "shopping cart" button
  4. Get a message saying "Your Shopping Cart is Empty"

Sometimes, I also notice that the "Log Out" button has changed to "Log In", but not always. If not, I can use "checkout" to check out and my order appears to be correct. If it has changed to "Log Out," I don't get the checkout option. If I switch to incognito mode and log in, or log in via Safari, I can see my shopping cart.

Refreshing the page and clearing the cache does not seem to help. Turning off extensions in Chrome did not help, either.

We're running PHP 7.4.16. We tried updating to a newer version, but saw other problems with the site. I haven't found any Zen Cart log files that seem to correspond to the issue, though I am not a PHP expert.

Thanks in advance!

3 Apr 2021, 11:18 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

Are you sure you're on PHP7.4? You have the persistent zenid problem that was common to PHP 5.6 installations.

4 Apr 2021, 6:46 AM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

One way to check which version of php under which ZC is operating is from the admin, click on the version link in the upper right.

4 Apr 2021, 11:04 AM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

That generally works but in a case like this I'd want to be 100% sure (since they could have reset the PHP version in admin only). Put a file in the root of the store that does

<?php phpinfo(); and run it.
4 Apr 2021, 2:13 PM
#5
toomuchmusic avatar

toomuchmusic

New Zenner

Join Date:
Oct 2014
Location:
Massachusetts, United States
Posts:
21
Plugin Contributions:
0

Re: v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

Thanks. Confirmed the PHP version via the hosting site (siteground), ZC admin page, and the PHP script you supplied:

PHP Version 7.4.16
System Linux giowm1183.siteground.biz 3.12.18-clouder0 #1 SMP PREEMPT Mon Sep 21 14:18:04 EEST 2020 x86_64
Build Date Apr 1 2021 11:37:36
Configure Command './configure' '--prefix=/usr/local/php74' '--with-config-file-path=/usr/local/php74/lib' '--with-config-file-scan-dir=/usr/local/php74/etc:/etc/local/php74' '--with-pear=/usr/local/php74/pear' '--mandir=/usr/man' '--enable-ipv6' '--enable-mysqlnd' '--with-mysqli=mysqlnd' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-intl' '--enable-mbstring' '--enable-opcache' '--disable-huge-code-pages' '--enable-pcntl' '--enable-sysvmsg' '--enable-sysvsem' '--enable-shmop' '--enable-soap' '--enable-sockets' '--with-apxs2' '--with-bz2' '--with-curl' '--with-gdbm' '--with-enchant' '--with-freetype' '--with-external-gd' '--enable-gd' '--with-gettext' '--with-gmp' '--with-iconv' '--with-imap' '--with-imap-ssl' '--with-jpeg' '--with-kerberos' '--with-libdir=lib64' '--with-libedit' '--with-mhash' '--with-openssl' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pgsql' '--with-pspell' '--with-readline' '--with-sodium' '--with-tidy' '--with-xmlrpc' '--with-xpm' '--with-xsl' '--with-zlib' '--with-zip' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path /usr/local/php74/lib
Loaded Configuration File /usr/local/php74/lib/php.ini
Scan this dir for additional .ini files /usr/local/php74/etc:/etc/local/php74
Additional .ini files parsed /usr/local/php74/etc/extensions.ini, /usr/local/php74/etc/limits.ini
PHP API 20190902
PHP Extension 20190902
Zend Extension 320190902
Zend Extension Build API320190902,TS
PHP Extension Build API20190902,TS
Debug Build no
Thread Safety enabled
Thread API POSIX Threads
Zend Signal Handling enabled
Zend Memory Manager enabled
Zend Multibyte Support provided by mbstring
IPv6 Support enabled
DTrace Support disabled
Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filters zlib., bzip2., convert.iconv., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk
Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
with Zend OPcache v7.4.16, Copyright (c), by Zend Technologies

4 Apr 2021, 2:40 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

Ah, siteground :censored:. They instituted a feature called SuperCacher somewhere late February/early March that wrecks havoc with Zen Cart sites.

You'll need to navigate to your cPanel and

  1. Disable the NGINX Cache.
  2. For each of the sites hosted, click on the teeny broom-looking icon to flush the existing cache.

Finally, update your site's root .htaccess file, adding the following to the top of the file:

<IfModule mod_headers.c>
Header set Cache-Control "max-age=0,no-store"
</IfModule>

Once that section has been added to the .htaccess file, click that/those broom-icons again just to be sure.

4 Apr 2021, 2:51 PM
#7
toomuchmusic avatar

toomuchmusic

New Zenner

Join Date:
Oct 2014
Location:
Massachusetts, United States
Posts:
21
Plugin Contributions:
0

Re: v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

Will try that -- thanks! I had already disabled the NGIX cache because it looked suspicious, but I will add the .htaccess change and re-clear the caches.

4 Apr 2021, 3:14 PM
#8
toomuchmusic avatar

toomuchmusic

New Zenner

Join Date:
Oct 2014
Location:
Massachusetts, United States
Posts:
21
Plugin Contributions:
0

Re: v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

Disabled the NGIX cache and "swept" the caches, and that seems to have done the trick! Chrome was still broken at first, but once I cleared all of my browsing data I was able to log in to our site and stay logged in. Firefox worked immediately.

Thank you!

4 Apr 2021, 3:18 PM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

TooMuchMUsic:

Disabled the NGIX cache and "swept" the caches, and that seems to have done the trick! Chrome was still broken at first, but once I cleared all of my browsing data I was able to log in to our site and stay logged in. Firefox worked immediately.

Thank you!
No problems. That 'sweeping' update by siteground broke a couple of my clients' sites as well.

4 Apr 2021, 10:29 PM
#10
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,956
Plugin Contributions:
8

Re: v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

lat9:

Ah, siteground :censored:. They instituted a feature called SuperCacher somewhere late February/early March that wrecks havoc with Zen Cart sites.

You'll need to navigate to your cPanel and

  1. Disable the NGINX Cache.
  2. For each of the sites hosted, click on the teeny broom-looking icon to flush the existing cache.

Finally, update your site's root .htaccess file, adding the following to the top of the file:

<IfModule mod_headers.c> Header set Cache-Control "max-age=0,no-store" </IfModule> ``` > > Once that section has been added to the .htaccess file, click that/those broom-icons again just to be sure.

awesome bit of info here! thanks for sharing.

5 Apr 2021, 11:14 AM
#11
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: v157b - "Your Shopping Cart is Empty", but only in some browsers and not Incognito

carlwhat:

awesome bit of info here! thanks for sharing.
The siteground tech support were very, ***very ***helpful. My only issue with their service is that they blindly applied their SuperCacher to all sites without understanding the ramifications.