Jump to content

Unable to add items to shopping cart after upgrade to 6


Recommended Posts

I just attempted to upgrade 5.2.16 to 6.0.2 and ran into an issue of not being able to add an item to the shopping cart.  Kept getting an error stating that the item was no longer available and has been removed from your basket.  I cleared the cache directory and the issue was never resolved.  

 

The error log kept populating with [06-Apr-2015 19:02:43 America/Chicago] PHP Notice:  `customer_id` is not allowed as a key in 'CubeCart_saved_cart' table! in /home/********/public_html/classes/db/database.class.php on line 852

 

Any Ideas? I restored to a backup until I know there is a fix for this problem. 

Link to comment
Share on other sites

For the database functions to say that a column does not exist, when it plainly does, suggests to me that the database host/user/pass is pointing to the wrong database. But that shouldn't happen if the database being used is the same one as what was being used before the upgrade.

 

If you are able to look at the database using an external utility, like phpMyAdmin, please check on what the table CubeCart_saved_cart looks like.

Link to comment
Share on other sites

May I ask if you upgraded from CubeCart v3/v4 into CC5? Then to CC6?

 

If so, did you have a mod for CC3/4 that had CubeCart save customer's carts/orders?

 

If so, then this table may have interfered with the upgrade process from CC3/4 to CC503 where:

CREATE TABLE IF NOT EXISTS `CubeCart_saved_cart`

If the table existed, it would not get re-created, but probably have different columns.

 

Given the above, CC503+ has the ability to save customer's carts between sessions (admin, Store Settings, Features tab, "Auto save user's cart"). But, CC5 also has the ability to switch this feature off. In that case, this table would never be used and never cause this error.

 

However, it appears that CC6 will always use this feature. Thus, an existing table with the wrong schema will cause this error.

Link to comment
Share on other sites

  • 2 weeks later...

Is it okay that I complete dropped that table? When I did the upgrade it didn't readd it.  

My Error logs are populating with the following error: 

PHP Notice:  `customer_id` is not allowed as a key in 'CubeCart_saved_cart' table! in /home/####/public_html/classes/db/database.class.php on line 852

Edited by Atechstl
Link to comment
Share on other sites

The table did not get re-created??? Well, sure, an upgrade changes the existing database schema. It does not check for anything about the database schema that may be amiss.

Using an external utility such as phpMyadmin, execute the statement that creates this table:

CREATE TABLE `CubeCart_saved_cart` (
  `customer_id` INT UNSIGNED NOT NULL,
  `basket` mediumblob NOT NULL,
  PRIMARY KEY (`customer_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...