Jump to content

MySQL error when viewing cart containing products with options


Guest Joff

Recommended Posts

This has just been reported by a client using 4.3.3, does anyone know if it's been resolved in later versions?

When a product with an option is added to the cart, and then the cart is viewed we get the following error:

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 '@697' at line 1

SELECT T.* FROM CubeCart_options_top AS T WHERE T.option_id = 1@697

Has anyone else experienced this before?

Link to comment
Share on other sites

See: http://bugs.cubecart.com/bug_view_advanced_page.php?bug_id=1550

The delimiter for exploding on the product options string (don't ask me why it was designed this way) was changed from: @ to {@} and from | to {|}.

You need to ensure that the delimiters are consistent throughout. If the delimiter is set to @, try changing it to {@}. Also, try doing the same for the other delimiter (i.e. the pipe).

I forget exactly in which file this is set. It might be the cart class??

Hope this points you in the right direction.

Link to comment
Share on other sites

See: http://bugs.cubecart.com/bug_view_advanced_page.php?bug_id=1550

The delimiter for exploding on the product options string (don't ask me why it was designed this way) was changed from: @ to {@} and from | to {|}.

You need to ensure that the delimiters are consistent throughout. If the delimiter is set to @, try changing it to {@}. Also, try doing the same for the other delimiter (i.e. the pipe).

I forget exactly in which file this is set. It might be the cart class??

Hope this points you in the right direction.

Cheers Homar, I spotted that in cart.inc.php so I'll see what changing it there does.

I suppose changing it from @ to {@} makes the delimiter a bit more unique should the string contain those characters already but as we're exploding ID's in this instance I agree it's probably a bit excessive.

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