Jump to content

Unusual error when adding item to cart


asosservis

Recommended Posts

Hello. I have very unusual problem only with some items but i dont know how much of them have the same problem because i have over 19000 items and can not test each one.

 

The server throws error when trying to add the item to the cart. I am attaching a screenshot of the error. This is only on some items. I hope that somebody could help me to solve this problem.

post-1323856-0-82385900-1486504241_thumb.png

post-1323856-0-43545600-1486504258_thumb.png

Link to comment
Share on other sites

After doing what rocky suggested, try adding to the cart again, inspect the network tab in chrome's debug console and see what the response for the add to cart is

Ok i made this and now when try adding to a cart i am getting a very long error message so i hope somebody from You will help me. Here is a copy paste of a complete error. You can try yourself to add this to cart and You will see it.

 

Impossible to add the product to the cart.

textStatus: 'parsererror'

errorThrown: 'SyntaxError: Unexpected token < in JSON at position 0'

responseText:

 

Fatal error: Uncaught exception 'Exception' with message 'Forbidden chars in cookie' in /home/topproda/public_html/classes/Cookie.php:176 Stack trace: #0 /home/topproda/public_html/modules/ganalytics/ganalytics.php(841): CookieCore->__set('ga_cart', 'a:1:{i:731;a:11...') #1 /home/topproda/public_html/classes/Hook.php(587): Ganalytics->hookActionCartSave(Array) #2 /home/topproda/public_html/classes/Hook.php(542): HookCore::coreCallHook(Object(Ganalytics), 'hookactionCartS...', Array) #3 /home/topproda/public_html/classes/Cart.php(214): HookCore::exec('actionCartSave') #4 /home/topproda/public_html/classes/Cart.php(1071): CartCore->update() #5 /home/topproda/public_html/controllers/front/CartController.php(300): CartCore->updateQty(1, 731, 0, 0, 'up', 0) #6 /home/topproda/public_html/controllers/front/CartController.php(73): CartControllerCore->processChangeProductInCart() #7 /home/topproda/public_html/classes/controller/Controller.php(178): CartControllerCore->postProcess() #8 /home/topproda/public_html/classes/Dispatcher. in /home/topproda/public_html/classes/Cookie.php on line 176

Link to comment
Share on other sites

I bet it's because your site is using a language with non unicode chars, they probably need to be encoded by the module...but they are not, doesn't look easy as it's the module's fault, as rocky pointed out

Do You maybe know how it would be possible to solve this problem because i really need to use a google analytics module. Now i have turned it off but i would need to use this. Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...