Forums / Bug Reports / ADD to Cart/Shopping Cart Error - 1.3.9H

ADD to Cart/Shopping Cart Error - 1.3.9H

Locked

Views: 2,305

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
8 Nov 2010, 9:14 PM
#1
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

ADD to Cart/Shopping Cart Error - 1.3.9H

I am not exactly sure how to fix or diagnose this problem but since upgrading to Zen Cart 1.3.9H, we've been experiencing Add to Cart problem.

Here is how to get to the problem (which doesn't happen ALL the time but once triggered it stays triggered until server is rebooted)

Find any item, add it to cart

the screen just stays and looks like things are loading, if you navigate to home page or any other product page with shopping cart you will see the item is indeed added

However, if you stay on the product page after adding, the next page should be shopping cart page except that ours doesn't go to the shopping cart page, it keeps spinning and spinning but finally will go to the shopping cart page.

Technically, it will appear that nothing is broken but the fact that it takes eternity for shopping cart to show up after clicking on add to cart is a serious issue as no customer will wait for that to happen.

Not exactly sure what's going on but it's definitely and issue with shopping cart and I know this page was touched in 1.3.9H.

I'd appreciate any help in diagnosing the root cause and solution to this.

Thanks!

I should add that nothing is showing in the debug file and I don't know what's triggering the issue.

Well, I can actually confirm that the issue is with the shopping cart not Add to Cart because when I wait enough for something to be added to cart, editing shopping cart (i.e. removing and item from the cart takes eternity as well). Not really sure what's causing the issue.

9 Nov 2010, 1:48 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

I can't simulate this on a clean uncustomized copy of v1.3.9h.

It seems to point to something unique to your site. > BlessIsaacola:

Not exactly sure what's going on but it's definitely and issue with shopping cart and I know this page was touched in 1.3.9H.Okay, if I were to go with that line of reasoning, then it would seem that backing out that one file would fix your problem.
I suspect it doesn't, since that file wasn't touched in a way that should have any such effect.

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

9 Nov 2010, 2:39 AM
#3
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

DrByte:

I can't simulate this on a clean uncustomized copy of v1.3.9h.

It seems to point to something unique to your site. Okay, if I were to go with that line of reasoning, then it would seem that backing out that one file would fix your problem.
I suspect it doesn't, since that file wasn't touched in a way that should have any such effect.

It's a very annoying issue because it doesn't generate an error in the log nor does it happen consistent. However, once it happens our cart is messed up. I may just have to backout 1.3.9H until after Christmas since I wasn't experiencing this issue in 1.3.9G.

Even if it's something specific to our site, it's more important to have a working site during this time of the year than whatever feature was added in 1.3.9H. I will deal with this in January instead of bleeding because of this issue (if I can't figure out a way to trace the issue).

I can say this much that whatever is specific to our site works just find with version 1.3.9G and that may be the temporary solution.

I personally can't duplicate this problem myself and don't know how our customer triggers it since there's nothing in the log.

9 Nov 2010, 2:52 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

After investigating further, I'm having trouble identifying anything unique to v1.3.9h that would trigger it.
And, honestly I'd be surprised if backing out to 1.3.9g will actually solve the problem.

I can understand how frustrating it would be --- certainly not what you'd want your store doing ... anytime, let alone during November/December!

It might be useful to identify what they're adding to their cart. Maybe it's something to do with a specific combination of products (esp attributes)?

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

9 Nov 2010, 3:22 AM
#5
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

DrByte:

After investigating further, I'm having trouble identifying anything unique to v1.3.9h that would trigger it.
And, honestly I'd be surprised if backing out to 1.3.9g will actually solve the problem.

I can understand how frustrating it would be --- certainly not what you'd want your store doing ... anytime, let alone during November/December!

It might be useful to identify what they're adding to their cart. Maybe it's something to do with a specific combination of products (esp attributes)?

Yeah! It's the identifying the problem that stresses me out since the problem doesn't happen consistently and I cannot trigger it. Once it happens, there is nothing unique about the products, it happens with any type of products. My next step is to go through each of the Admin settings to make sure nothing is set causing issues.

I only mentioned going back to 1.3.9g only because that version was more forgiving to whatever issue we are experiencing now since it never happened with 1.3.9g. In other words, if we have a self created issue on our site, 1.3.9g seems to play with our error without triggering this specific error.

If you have any idea of anything I can turn on that will trap more messages or log more errors please let me know.

If I can't even figure out the source of the problem I cannot get help from the problem.

Thanks!

9 Nov 2010, 4:06 AM
#6
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

There was no mention of a test area. If there is can the problem be duplicated?

If you have root access;

  • does your Firewall settings tell you anything
  • does Apache error log tell you anything
  • does top tell what's going on with the process

In the interim, is it an option to switch from going to Shopping Cart to staying on the Product description page?

Admin > Configuration > My Store
Display Cart After Adding Product

The learning is in the doing.

Potent Products

9 Nov 2010, 6:46 AM
#7
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

Website Rob:

There was no mention of a test area. If there is can the problem be duplicated?

If you have root access;

  • does your Firewall settings tell you anything
  • does Apache error log tell you anything
  • does top tell what's going on with the process

In the interim, is it an option to switch from going to Shopping Cart to staying on the Product description page?

Admin > Configuration > My Store
Display Cart After Adding Product

Thanks so much Rob for your insight.

The problem can be duplicated at the moment in test because the test and production are exactly the same thing and on the same server using same configuration.

Unfortunately, I don't know the step to replicate the issue since it doesn't happen all the time even in production. When I switched to default template and setting in test, I am not sure if things are working different because I don't have enough transaction to trigger the issue and there are only a few of us testing different scenario to see if we can trigger the error.

The Apache error log doesn't show anything that I can correlate back.

I don't know exactly what you want me to look for with regards to firewall or top (if you have directions for me I'd be glad to check for it).

If I make the change on the Admin things are okay until the customer clicks on the shopping cart link in the header, then things start to spinning for what seems like eternity and eventually goes to the shopping cart.

I think technically because it's not error out (just take very very long time to display shopping cart) I am wondering if that's why no error is actually being logged.

It's almost like something is taking too long or some funky query or something like that.

It doesn't help that this doesn't happen consistently and I don't know how to trigger it.

Thanks!

9 Nov 2010, 8:43 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

"top" could be used to find out what server process is hogging the CPU while "things start spinning". It's a server console command-line utility. You need SSH to do it.
Similar could be done with "mytop", if you have it, for most demanding SQL queries happening.
Both are real-time tools.

Further, you could check your database schema to ensure that all original indexes are actually intact. (export schemas from live and from a brand new database, and compare them with something like winmerge). Again, this wouldn't be a problem unique to 1.3.9h, since there were no schema changes since 1.3.9a.

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

9 Nov 2010, 5:27 PM
#9
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

DrByte:

"top" could be used to find out what server process is hogging the CPU while "things start spinning". It's a server console command-line utility. You need SSH to do it.
Similar could be done with "mytop", if you have it, for most demanding SQL queries happening.
Both are real-time tools.

Further, you could check your database schema to ensure that all original indexes are actually intact. (export schemas from live and from a brand new database, and compare them with something like winmerge). Again, this wouldn't be a problem unique to 1.3.9h, since there were no schema changes since 1.3.9a.

DrByte, thanks for the clarification. Although have root access, I am clueless when it comes to "top" and "mytop" I will do some reading about it as well as contact our host company. We are on a dedicated server so I have access to be dangerous :) but I try not to touch things I don't understand.

I am assuming the db schema you referenced is comparing the structure of our production to a clean 1.3.9. If that's the case I didn't notice any significance difference. If I am comparing the wrong thing please set me straight.

One obvious thing I noticed is that the clean structure of 1.3.9 includes collation information which my production version doesn't so I don't know if that's significant.

Here's an example of clean 1.3.9

CREATE TABLE IF NOT EXISTS `address_book` (
  `address_book_id` int(11) NOT NULL auto_increment,
  `customers_id` int(11) NOT NULL default '0',
  `entry_gender` char(1) collate latin1_general_ci NOT NULL default '',
  `entry_company` varchar(64) collate latin1_general_ci default NULL,
  `entry_firstname` varchar(32) collate latin1_general_ci NOT NULL default '',
  `entry_lastname` varchar(32) collate latin1_general_ci NOT NULL default '',
  `entry_street_address` varchar(64) collate latin1_general_ci NOT NULL default '',
  `entry_suburb` varchar(32) collate latin1_general_ci default NULL,
  `entry_postcode` varchar(10) collate latin1_general_ci NOT NULL default '',
  `entry_city` varchar(32) collate latin1_general_ci NOT NULL default '',
  `entry_state` varchar(32) collate latin1_general_ci default NULL,
  `entry_country_id` int(11) NOT NULL default '0',
  `entry_zone_id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`address_book_id`),
  KEY `idx_address_book_customers_id_zen` (`customers_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ;

Here is an example of production:

CREATE TABLE IF NOT EXISTS `address_book` (
  `address_book_id` int(11) NOT NULL auto_increment,
  `customers_id` int(11) NOT NULL default '0',
  `entry_gender` char(1) NOT NULL default '',
  `entry_company` varchar(32) default NULL,
  `entry_firstname` varchar(32) NOT NULL default '',
  `entry_lastname` varchar(32) NOT NULL default '',
  `entry_street_address` varchar(64) NOT NULL default '',
  `entry_suburb` varchar(32) default NULL,
  `entry_postcode` varchar(10) NOT NULL default '',
  `entry_city` varchar(32) NOT NULL default '',
  `entry_state` varchar(32) default NULL,
  `entry_country_id` int(11) NOT NULL default '0',
  `entry_zone_id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`address_book_id`),
  KEY `idx_address_book_customers_id_zen` (`customers_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=33956 ;

I see a consistent pattern of the colation information on new 1.3.9 structure but not the one I downloaded for production.

Not sure if this is something significant or not.

Thanks for your input.

10 Nov 2010, 12:28 AM
#10
drbyte avatar

drbyte

Sensei

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

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

I'd be surprised if collation was an issue with the symptoms you're describing.

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

10 Nov 2010, 12:39 AM
#11
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

Isaacola, if you have a Dedicated server do you also have someone maintaining it for you or is it managed by your provider? Whomever it is would be the one to ask and show you, about Top, your Firewall and other things in general. Presuming you are using a Linux server, once logged into shell you simply type: top which will show what is going on. The information is very informative but will be useless without knowledge of what to look for.

The learning is in the doing.

Potent Products

10 Nov 2010, 2:45 AM
#12
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: ADD to Cart/Shopping Cart Error - 1.3.9H

DrByte:

I'd be surprised if collation was an issue with the symptoms you're describing.

I didn't think so either but wanted to post back what I noticed as the only difference.

Well, maybe I should just keep talking about it since it hasn't happened since I started posting about it yesterday :D