Author |
Topic |
|
suz5002
Starting Member
30 Posts |
Posted - April 01 2009 : 21:59:53
|
HI, I am trying to set up a shopping cart for some of our customers to make it easier for them. I have chosen to use the wish list rather than the shopping cart so that the cart will be saved on the server rather than as a cookie. To do this I have chosen "yes" to the following as stated in the manual (pgs 121-122) xallowsavecart xwishlist xproductwishlist
I logged in as the customer and added their items into the cart. Then clicked on wish list, was prompted to name the cart and then clicked on continue and received the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e57'
[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.
/shopsaveperm.asp, line 156
I have gone thru the manual and cannot find what I did wrong. Can anyone help please?!! Thanks in advance for your time and help. Take care, Catherine |
|
g3nnin
VP-CART Super User
209 Posts |
Posted - April 29 2009 : 16:26:30
|
Hi,
It seems that the wish list details is not large enough to handle the data.
You might want to try increasing the cartcookies field size in savedcarts table. |
|
|
anathanson
Starting Member
31 Posts |
Posted - May 15 2009 : 15:24:54
|
I'm getting the same error with the wish list. The problem appears to be a limitation of the database -- it's only able to store 255 characters per field. I looked at the savedcarts table and it is storing way too much data: I would have expected just the product ID and quantity, but for some reason the cartcookie field has short description, image link and a lot more. If you add too many products, it quickly runs out of room in the field and throws that truncation error.
A much smarter solution would be to store only the product catalog id and quantity. We can't use the local cookie for the same reason -- we need to set up the cart on our end and store it in the database so customers can get to it.
We're selling complete irrigation systems containing many components and need to be able to set up saved carts for customers to restore.
Any suggestions would be appreciated. |
|
|
g3nnin
VP-CART Super User
209 Posts |
Posted - May 18 2009 : 13:57:10
|
Hi,
The product fields for cart detail itself is retrieved from xcartfields in admin page.
You might want to reduce the value to contains only a few fields from product table |
|
|
anathanson
Starting Member
31 Posts |
Posted - May 18 2009 : 14:08:37
|
We solved the problem (for now) by increasing the cartcookies field size in the SQL database to a max of 8000 characters. It was previously set at 1000 characters. That seems to have taken care of it.
But fundamentally, it seems dumb to store all that info in the cartcookies field, including image path, short description, etc. Why not just store the catalog ID and quantity for each item in the saved cart/wishlist? Then upon restore, go load up the cart with the rest of the content?
It's not a problem when people only buy a couple items, but when you get beyond 10-15 items in the cart, it chokes. |
|
|
|
Topic |
|