Jump to content

My SQL Error - Add to Basket - Product Options (Help!)


grafis

Recommended Posts

Help!

We're receiving a MySQL Error for all products that have Color Options - as soon as you click "Add To Basket" you get the error below.

You then receive the error from that point forward when trying to view your cart or adding any other items to the cart.

You can add, subtract modify all non option products as much as you want without issue.

I've run an "Update Image Database" and "Clear Cache" and browsed all images looking for an issue. I'm assuming something with the upgrade to 4.3.7 or a new image caused a problem in the database. Where to start?

MySQL Error Occurred

Error Message: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{' at line 1

SQL: SELECT T.* FROM CubeCart_options_top AS T WHERE T.option_id = 1{

CubeCart Version: 4.3.7

PHP Version: 5.2.8

MySQL Version: 5.0.85-community-log

Image upload folder size: 9.6 MB

Server Software: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a

Link to comment
Share on other sites

Guest Roger Huston

Usually errors like this occur when people perform an update but do not perform the database upgrade. Do a diff between database files between your version and the version you updated from and you will probably find new fields added to the database. You could also run the update sql script too.

This happened to me a couple of times early on, until I updated the database.

- Roger

Link to comment
Share on other sites

Guest cherubix

Help!

We're receiving a MySQL Error for all products that have Color Options - as soon as you click "Add To Basket" you get the error below.

You then receive the error from that point forward when trying to view your cart or adding any other items to the cart.

Hi, have you found solution to this problem? I got the same error :) have spent all day trying to find and fix it.

Link to comment
Share on other sites

CC support had me replace three files - I guess one was corrupt? Whats odd is the issue only occurred if you added an item with options to the Cart, non options products worked fine.

classes/cart/shoppingCart.php

includes/boxes/shoppingCart.inc.php

includes/content/cart.inc.php

Link to comment
Share on other sites

Guest cherubix

Whats odd is the issue only occurred if you added an item with options to the Cart, non options products worked fine.

Thank you for the quick reply.

Yep, exactly the same problem here, luckily one of our customers have informed us, otherwise I would have never found out about it. I think there is a bug somewhere as a few other people have posted regarding the same problem on cubecart forums and on bugs reporting website.

Cubecart people should have released new files for people to download, maybe version 4.3.8 is out soon to address this issue :)

Do you mind sharing these 3 files?

Thanks

Link to comment
Share on other sites

I think it maybe an issue with the Hosting Providers Servers as I manage to fix this by reversing the change in the File: includes/boxes/shoppingCart.inc.php by adding the removed {} back in and now the store works fine.

Link to comment
Share on other sites

  • 3 months later...

I just got the same error upgrading to 4.3.9, and I did update the database, have replaced the new files with the old, and back again, all to no avail. The error remains ONLY when you add a product with options to the cart, but then messes up the entire session so a customer cannot process to any other page. I've been working on this same problem for literally 6 hours straight today. Any insight is greatly appreciated. I figured rolling back the files to 4.3.3 would have fixed it, but not at all.

;)

This has already been reported as a bug, but was "rejected" http://bugs.cubecart.com/view.php?id=1938

Link to comment
Share on other sites

  • 10 months later...
Guest Nightshade

I fixed this on my 4.3.9 install by reuploading:

/includes/boxes/shoppingCart.inc.php

/includes/content/cart.inc.php

Weirdly the files looked the same as my old ones, but something was obviously different.

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