Zen Cart Logo
Forums / General Questions / Weird "Add to cart" behavior

Weird "Add to cart" behavior

Views: 754

Results 1 to 10 of 10
9 Feb 2016, 9:52 AM
#1
jasonjason avatar

jasonjason

New Zenner

Join Date:
May 2015
Posts:
7
Plugin Contributions:
0

Weird "Add to cart" behavior

Hi to the community!

I've been trying several ways to solve this, but the error still occurs.

1: adding an item to the cart, the shopping cart shows up correctly
2: trying to add another item to the cart, the shopping card shows up but **without **the last added item.
3: at the shopping cart, removed all items and browse for other items and add 1 item again, all previous removed items show up again :frusty:

What is happening here?

I tried error log and strict error log, but it did not mention any error.

My ZenCar is:
URL: http:// esiamcenter (dot) com
Server OS: Linux 3.12.41-77.ELK6.x86_64
PHP Version: 5.4.45 (Zend: 2.4.0)
Database: MySQL 5.5.42-37.1
HTTP Server: Apache
Zen Cart 1.5.0
Database Patch Level: 1.5.0

Please help to solve this weird behavior.

Thank you

9 Feb 2016, 10:53 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Weird "Add to cart" behavior

When did this start? What changes were made before it happened and after the last time it worked, how are the files different from a default/vanilla install, did/do you rename files and incorrectly maintain the extension of .php? What plugins are installed?

Should be enough to get started. :)

9 Feb 2016, 2:22 PM
#3
jasonjason avatar

jasonjason

New Zenner

Join Date:
May 2015
Posts:
7
Plugin Contributions:
0

Re: Weird "Add to cart" behavior

mc12345678:

When did this start? What changes were made before it happened and after the last time it worked, how are the files different from a default/vanilla install, did/do you rename files and incorrectly maintain the extension of .php? What plugins are installed?

Should be enough to get started. :)

Well not sure when it started, as just noticed today.
These things has been changed recently:
2016 Jan 15: Installed SSL Certificate, which is working correctly
After the SSL Certificate installed (When exactly is unknown and just noticed today) : The hatching account at the hosting company "Hostgator" has been limited and just a 12h cached version of our web content is shown as recently they noticed a high CPU usage resulting from our account. We have a few domains registered with them and are in touch to get things right again
2015 Sept 09: Installed a blog which shows header and footer from the zencart in our sub folder /blog/

Interesting is, that our test installation, which did not had any changes since long time is having the same problem as well. This testing shop is in sub folder /probe/

Any ideas?

Thank you so much in advance!

9 Feb 2016, 2:48 PM
#4
jasonjason avatar

jasonjason

New Zenner

Join Date:
May 2015
Posts:
7
Plugin Contributions:
0

Re: Weird "Add to cart" behavior

(Update)
Just installed a test shop in the /2016/ sub folder and activated the SSL Certificate as well.
All is working fine when adding and removing items to the cart.

Therefore it is not an issue with the SSL certificate or Hosting account.

Any ideas of narrowing down the error in my live shop in the root folder?

9 Feb 2016, 10:03 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Weird "Add to cart" behavior

PHP Version: 5.4.45 (Zend: 2.4.0)
Database: MySQL 5.5.42-37.1
HTTP Server: Apache
Zen Cart 1.5.0
You might be experiencing a compatibility issue
Zen Cart v1.5.0 is compatible with PHP 5.2.14 thru PHP 5.3.x. Requires patches to work with PHP 5.4, and upgrading is a better idea.

https://www.zen-cart.com/content.php?48-what-are-the-server-requirements-to-run-zen-cart

10 Feb 2016, 4:52 AM
#6
jasonjason avatar

jasonjason

New Zenner

Join Date:
May 2015
Posts:
7
Plugin Contributions:
0

Re: Weird "Add to cart" behavior

Dear Kobra,

thank you for your reply.

I did some testing: installed a new test shop in the /zen150/ folder (ver 1.5.0) just to see how the original zen cart is behaving.
For my surprise, the add to cart or update cart malfunction is the same.
Also installed a 1.5.1 version to play with and noticed that the malfunction disappeared.
Therefore it has to do with 1.5.0 ZenCart.

Can you please send me a link for making the patches for Zencart 1.5.0 to work with PHP 5.4?

Best regards

10 Feb 2016, 9:07 AM
#7
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Weird "Add to cart" behavior

Ummm. Why not upgrade to... I don't know perhpas 1.5.4 which freely supports PHP 5.4-5.6? (Actual span includes some lower PHP, but not 7.0 directly).

One reported fix is in includes/functions/html_output.php there is code similar to below.

      if (defined('SID') && zen_not_null(SID)) {
        $sid = SID;

This needs to be changed to:

      if (defined('SID') && zen_not_null(constant('SID'))) {
        $sid = constant('SID');
24 Feb 2016, 4:53 AM
#8
jasonjason avatar

jasonjason

New Zenner

Join Date:
May 2015
Posts:
7
Plugin Contributions:
0

Re: Weird "Add to cart" behavior

Solved!
Thank you for ever ones help!
After contacting the hosting company, they reactivated my account as it has been a chased version. Reason: another site I'm hosting with the same account had a module using too much CPU resources.
Therefor, the Zen-Cart is working again 100%

Please let me know how to close or mark as solved.

Bests

24 Feb 2016, 11:22 AM
#9
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Weird "Add to cart" behavior

JasonJason:

Solved!
Thank you for ever ones help!
After contacting the hosting company, they reactivated my account as it has been a chased version. Reason: another site I'm hosting with the same account had a module using too much CPU resources.
Therefor, the Zen-Cart is working again 100%

Please let me know how to close or mark as solved.

Bests

Glad resolved. Can't say I understand what is meant by a "chased" version, but at least the issue is resolved.

25 Feb 2016, 4:02 AM
#10
jasonjason avatar

jasonjason

New Zenner

Join Date:
May 2015
Posts:
7
Plugin Contributions:
0

Re: Weird "Add to cart" behavior

mc12345678:

Glad resolved. Can't say I understand what is meant by a "chased" version, but at least the issue is resolved.

I meant "cached" Sorry ;-)