Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Unable to add items to cart Rate Topic   - - - - -

 
  • thernes
  • Junior Member
  • Members
  • Join Date: 02-Jul 08
  • 14 posts

Posted 20 August 2013 - 07:24 PM #1

Hi guys

Every time I try to add an item in the store to the cart, I get this error at the top of the screen

ErrorOops, something went wrong (SyntaxError: Unexpected token <). Please try again.


Got the same error when calculating shipping, but this was solved here:
http://forum.cs-cart...ating-shipping/

Anybody else with this problem?

 
  • AgentEccks
  • Junior Member
  • Members
  • Join Date: 12-Jan 07
  • 39 posts

Posted 14 April 2015 - 02:16 AM #2

I just installed a trial of v4.2.4 and upon trying to add an item to the cart I get the error message as noted above:

Oops, something went wrong (SyntaxError: Unexpected token <). Please try again.


This seems to be an almost 2 year old issue with no response.

Any help would be apreciated.

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19471 posts

Posted 14 April 2015 - 08:31 AM #3

I just installed a trial of v4.2.4 and upon trying to add an item to the cart I get the error message as noted above:



This seems to be an almost 2 year old issue with no response.

Any help would be apreciated.


The issue can be caused by various number of reasons. Try to check server error logs

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • AgentEccks
  • Junior Member
  • Members
  • Join Date: 12-Jan 07
  • 39 posts

Posted 14 April 2015 - 08:23 PM #4

There is nothing to go on in the server logs.

I downloaded the raw Apache logs for the site in question, but when I click the `Add To Cart` button or `Add to Wish List` and get the error message, no `error_log` is generated in the account and the only thing that is listed in the logfile directly after that action is:

IP.Address - - [14/Apr/2015:13:08:08 -0700] "POST / HTTP/1.1" 200 16132 "http://domain.com/audio-downloads/URL/" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"

Any other suggestions?

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19471 posts

Posted 15 April 2015 - 12:38 PM #5

In the config.local.php file there is the following tweak:

'disable_dhtml' => false, // Disable Ajax-based pagination and Ajax-based "Add to cart" button

Try to enable it and check if you still receive the error

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • AgentEccks
  • Junior Member
  • Members
  • Join Date: 12-Jan 07
  • 39 posts

Posted 16 April 2015 - 02:05 AM #6

Once disabled:

'disable_dhtml' => true

I no longer got the error message. When I click add to cart the whole page flashes, then pops up the modal window, rather than gracefully loading the modal window.

What would be the cause of this, and is it something I can fix or adjust?

Here's some additional information on php:

PHP Version 5.4.39
System Linux 2.6.18-371.4.1.el5 #1 SMP Thu Jan 30 06:08:24 EST 2014 x86_64
Build Date Mar 28 2015 04:33:59
Configure Command './configure' '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-mbstring' '--enable-pdo=shared' '--enable-sockets' '--enable-zip' '--prefix=/usr/local' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with eAccelerator v0.9.6.1-ea, Copyright (c) 2004-2012 eAccelerator, by eAccelerator
with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd., and
with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies

At least I can proceed to test now. Thanks for the advice!

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19471 posts

Posted 16 April 2015 - 11:26 AM #7

Try to temporary disable eAccelerator. It can be the reason

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • AgentEccks
  • Junior Member
  • Members
  • Join Date: 12-Jan 07
  • 39 posts

Posted 17 April 2015 - 02:44 AM #8

I tried to disable eAccelerator by adding:

php_flag eaccelerator.enable 0
php_flag eaccelerator.optimizer 0


to my .htaccess file (per their instruction on Website), but I then get the following error:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.


The `error_log` shows the following:


PHP Notice:  Undefined index: ekey in /home/username/public_html/app/controllers/frontend/orders.php on line 402


 
  • CS-Market
  • Senior Member
  • Authorized Reseller
  • Join Date: 06-Mar 13
  • 674 posts

Posted 17 April 2015 - 08:11 AM #9

I tried to disable eAccelerator by adding:

php_flag eaccelerator.enable 0
php_flag eaccelerator.optimizer 0


to my .htaccess file (per their instruction on Website), but I then get the following error:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

The `error_log` shows the following:

PHP Notice:  Undefined index: ekey in /home/username/public_html/app/controllers/frontend/orders.php on line 402


Hello,

We can examin this issue and help you to solve it, just contact us.

Sincerely yours,
CS-Market.

GET A FREE QUOTE  │  CS-Cart add-ons   │   CS-Cart custom development   │  CS-Cart design integration  │  CS-Cart license

Сертифицированный разработчик на CS-Cart Русская Версия. More than 5 years experience in CS-Cart development.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19471 posts

Posted 17 April 2015 - 09:45 AM #10

I tried to disable eAccelerator by adding:

php_flag eaccelerator.enable 0
php_flag eaccelerator.optimizer 0


to my .htaccess file (per their instruction on Website), but I then get the following error:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

The `error_log` shows the following:

PHP Notice:  Undefined index: ekey in /home/username/public_html/app/controllers/frontend/orders.php on line 402


PHP Notice should not brake the store. It looks like the problem is in the .htaccess file. Some servers do not support such rules. Please ask server administrator to temporary disable eAccelerator

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.