Jump to content
meytalm

Technical Error: unable to add to cart

Recommended Posts

Hi,

This happened all of a sudden. My site worked fine.
I just tried to add any product to my cart and i get this:


TECHNICAL ERROR: unable to add the product.

Details:
Error thrown: [object XMLHttpRequest]
Text status: parsererror


Then after i do a refresh on the page i get this error:

Fatal error: "no default carrier"


In order for me to see the site again i need to delete all my cookies & cache in the browser.

Checked on FF & Chrome.

I checked online for some answers and there are a few. I dont want to go and touch the code and have something else get screwed.

Why is this happening all of a sudden? I havent added any items in the last couple of days.

HELP!!!!!!!!!!!!!!

Meytal

Share this post


Link to post
Share on other sites

Hello
I just installed new version 1.4.3 .but i get error for adding products to shopping cart.when i disable ajax works fine.i did not add any extra module or anything new.just fresh install with default theme.this is the error
TECHNICAL ERROR: unable to add the product.

Details:
Error thrown: [object XMLHttpRequest]
Text status: error
If someone can help me please
Thanks

Share this post


Link to post
Share on other sites

Can you post a link to the product page?

Did you make any changes to the shop? using a custom theme?

Share this post


Link to post
Share on other sites

Hello
I just changed to the older version 1.4.2.5 and works fine.i think is some bug in 1.4.3 because just tested on fresh install with default template and default modules.
Thank you for your reply.

Share this post


Link to post
Share on other sites

You can disable the ajax cart by enter the configuration page of the block cart module.

You can also try to get a solution to the problem, if you post a link to the site and provide more info.

Share this post


Link to post
Share on other sites

I think that problem is in CartController.php when evaluate add product.

if (($add OR Tools::getIsset('update') OR $delete) AND isset($_COOKIE[self::$cookie->getName()]))

When I receive the error $_COOKIE[self::$cookie->getName()] not return value, why?


When $_COOKIE[self::$cookie->getName()] (for example D2DnYIPugKc=65n4BGDmSvk=QtDseZBGOhg=p16C6ILLiWs=n0KDSclbigU=DaQSJzxp6CE=rlus0+51jiU=WNU0KhoMkBg=845aqjx25N0=1d3wPYbAfpQ=/H2X8lEtNT8=TJ+MhnaZqhA=O/2O+QvKvuU=V7eu8OxJqmw=8dUO8I/0A24=2Amdg5+ZsoM=IetrmCUUwZA=gM9aPfBrHF8=hciddRAxQHM=000149) works fine.

Share this post


Link to post
Share on other sites

Hi guys,

I've facing the same problem as meytalm. Currently I've disabled AJAX cart and the cart seems to work fine but currently my customers will be brought to the "Shopping cart summary" page.

I'd still prefer to have customers clicking on "Add to cart" and remains in the page. Is there anyway to solve this?

Help is much needed! Time is of the essence! Thank you people!!

Cheers,
Clement

Share this post


Link to post
Share on other sites

As mentioned in post #1, can you post a URL to a product page on your site?

What version of PS are you using?

Is it a clean install, or upgrade?

Does it happen on all products?

Share this post


Link to post
Share on other sites

Hi tomerg3.

 

I can't post a URL to a product page on my site because currently to temporarily solve the error, I've disable AJAX on my site, therefore the products can be ordered.

 

However, if you need to have, here is my product's website. http://www.petmarket.com.sg

 

I'm using 1.4.3 and it was an upgrade.

 

If i were to enable AJAX, customer the AJAX function CAN be successful only if customer click on "Add to cart" on featured products in the first place.

 

If a customer were to click on any "Add to cart" of one of the products listed in the featured product, the AJAX works fine for all "Add to cart" clicked on individual product page. Even the removal of product works!

 

HOWEVER, if a customer were to enter my site and click on the categories and choose a product, then the clicking of "Add to cart" will result in the technical error mentioned in this thread.

 

Hope that helps! Looking forward to hear from you!

Share this post


Link to post
Share on other sites

I also get this problem the only way i can get it to show is to login as a customer everything seems fine but when you logout and then try to add to cart the button hangs for a few seconds then the error message appears.

 

Mine also is an upgrade to 1.4.3 from 1.3.0.1

 

 

Regards,

 

Mark.

Share this post


Link to post
Share on other sites

You can send me a PM with the FTP info, I'll try to have a quick look.

Share this post


Link to post
Share on other sites

Just to add for people that find this thread your server needs mbsplit, if you have WHM just use easy apache to recompile and on option 6 you should have the option to add it.

Share this post


Link to post
Share on other sites

Hi,

I have installed version 1.4.4 with the test data (ipods etc) on my web host. I have enabled Paypal with a sandbox account. When I click to add a product to the cart (it seems to not matter which product) I get the following error displayed in a dialog box:

 

TECHNICAL ERROR: unable to add the product.

 

Details:

Error thrown: [object XMLHttpRequest]

Text status: error

 

The cart display is not updated to show the product has been added, but on subsequently viewing the cart the product has been added. This occurs for both the first product added and for any subsequent products.

 

Any suggestions?

 

Regards,

Roger

 

Here is my configuration:

Server information

 

Prestashop Version: 1.4.4.0

 

Server information: SunOS localhost 5.10 Generic_142900-13 sun4v SunOS localhost 5.10 Generic_142900-13 sun4v SunOS localhost 5.10 Generic_142900-13 sun4v

 

Server software Version: Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8r

 

PHP Version: 5.2.17

 

MySQL Version: 5.0.[spam-filter]log

Store information

 

URL of your website: http://www.bijouxmarche.com/__test__/

 

Theme name used: prestashop

 

Mail information

Mail method: You use your own SMTP parameters

SMTP server: smtp.strato.com

SMTP user: Defined

SMTP password: Defined

Encryption: ssl

Port: 465

 

Your information

Information from you: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0

 

Check your configuration

Required parameters: OK

Optional parameters: OK

  • Like 2

Share this post


Link to post
Share on other sites

If you have Full Server Access, this is the Info i received. Had Same Issue, and After Speaking to My Server/Hosting Company the IT Guy, Gave me these great Step-by-Step's. >>>>

 

In doing some reading, it appears that the mbstring PHP extension needs to be enabled in order for the mb_split function to work. This can be done within Easy Apache.

 

1. Go to Main > Software > EasyApache (Apache Update)

2. The Default radio button should be selected, click the Start customizing based on profile button.

3. Do not change any settings but continue to click Next until you reach section 5 - Short Options List, then click Exhaustive Options List at the bottom of the page.

4. Under PHP, check the checkbox for mbstring and then click the Save and Build button.

5. Complete the changes by following the wizard instructions.

 

You should see a window showing information while your server updating, it usually takes between 5 - 10 minutes to complete.

 

Please let me know if you have any further questions or concerns.

 

Thank you for choosing SoftLayer!

 

IT Guy

Customer Service Technician

http://www.softlayer.com

Share this post


Link to post
Share on other sites

Thanks for the info chino. I don't have access to the server settings but I will pass this request to my hosting company and see what they say. I'll keep you posted.

Share this post


Link to post
Share on other sites

Hey,

 

I have a problem with my shop. I cant add products to my cart. All the time I get this error:

 

TECHNICAL ERROR: unable to add the product.

 

Details:

Error thrown: [object XMLHttpRequest]

Text status: error

 

Here you can see:

http://www.goldcave.net/category.php?id_category=5

 

Hopefully somebody can help!

The site is not finished. So dont care about the rest :)

 

fupgames

Share this post


Link to post
Share on other sites

Do a search on the forum, this is most likely related to your PHP not using mb_string()

 

There are posts with more information about it, and suggestions to resolve it (you can always contact your host and ask them to add it).

Share this post


Link to post
Share on other sites

thanks for the fast reply!

 

Ive searched the forum and found many ways to solve it not sure which one is the correct one for me.

So I thought I post a new thread with my shop url. Maybe someone knows exactly what my problem is.

 

fupgames

Share this post


Link to post
Share on other sites

Turn on error reporting (/config/config.inc.php line #29).

 

In /modules/blockcart/ajax-cart.js

Change


	//send the ajax request to the server
	$.ajax({
		type: 'POST',
		url: baseDir + 'cart.php',
		async: true,
		cache: false,
		dataType : "json",
		data: 'add=1&ajax=true&qty=' + ((quantity && quantity != null) ? quantity : '1') + '&id_product=' + idProduct + '&token=' + static_token + ( (parseInt(idCombination) && idCombination != null) ? '&ipa=' + parseInt(idCombination): ''),
		success: function(jsonData,textStatus,jqXHR)
		{
			// add appliance to whishlist module

To


	//send the ajax request to the server
	$.ajax({
		type: 'POST',
		url: baseDir + 'cart.php',
		async: true,
		cache: false,
		//dataType : "json",
		data: 'add=1&ajax=true&qty=' + ((quantity && quantity != null) ? quantity : '1') + '&id_product=' + idProduct + '&token=' + static_token + ( (parseInt(idCombination) && idCombination != null) ? '&ipa=' + parseInt(idCombination): ''),
		success: function(jsonData,textStatus,jqXHR)
		{
alert(jsonData);
			// add appliance to whishlist module

 

This should create a Javascript alert with an error of some sort, let us know what it is.

Share this post


Link to post
Share on other sites

I have the same problem in 1.4.4.

 

Guest and OPC checkout enabled creates the "technical Error" when people try to register (create an account). It laso leads to other technical errors when adding addresses or adjusting cart quantities.

 

IF you ignore the error, the process still goes ahead fine. However, the error is not good for the customer to see.

 

I have canonical url activated under preference/SEO & URLS.

I have friendlies turned on.

I have mb string extensions enabled by my host.

 

There are many people writing threads to this problem but none of them seem to solve or identify the problem properly. Some have switched off Canonical URL, some have removed their domain name under the same settings (preferences/SEO & URLS) but this is not a good solution since it produces warning messages in the back end.

 

This problem occurs for me using my theme or the default theme.

 

I would love a clear solution so I can use opc and guest without problems.

  • Like 1

Share this post


Link to post
Share on other sites

David: See my previous reply, I commented out the json line, and added an alert of the returned value.

That will display the value that is returned from the ajax call, which should show the actual error.

 

While those are errors from different parts of the system, they use a similar ajax call, that expects to get values back in a certain format, if anything else is returned, you get a JS error alert.

 

You need to look for the ajax call that return the error you're seeing (order-opc.js off the top of my head), and apply the same changes as above

Share this post


Link to post
Share on other sites

I'd just like to make a comment about moving threads. I was watching my original thread under general discussions and thinking that it was not generating any responses. It was only when that thread was deleted that I searched and re-found it here. May I suggest that the original be left in place with a prefix [Moved] on the title and a link to the new location added at the end.

 

Anyway, to business. Despite the mbstring extension being enabled, the problem for me is still a call to undefined function mb_split() (found by enabling error messages as suggested by tomerg).

 

I have found a comment in the php manual (http://php.net/manual/en/mbstring.installation.php) which states

 

The mb_split() function requires PHP to be compiled with --enable-mbregex (as of PHP 5.3.0).

 

From other sources I understand that mbregex is enabled by default (for php5) when mbstring is enabled but my php has mbregex specifically disabled.

 

While I try to sort this out with my web host I have modified the only occurrence of mb_split() (in \tools\smarty\plugins\shared.mb_str_replace.php) to use split() instead.

 

In case mb_split() occurs anywhere else in the future I have now edited config/config.inc.php and added in the aliases section:

 

function mb_split($search, $subject) {

return split($search, $subject);

}

 

There are 2 downsides to this:

1. If mult-byte characters are required it will not work - I think these will only occur for languages like Chinese or Japanese, so not a problem for me.

 

2. This change must be made after each prestashop update.

Edited by BijouxMarche (see edit history)

Share this post


Link to post
Share on other sites

hello - i have this error also.

 

i added some products while using the default theme.

I then added a new theme and more products so expect it is theme related.

 

I have disabled the cart for now, but would like to resolve this. will upgrading to 1.4.4.0 repair this error?

thanks in anticipation

Share this post


Link to post
Share on other sites

I'd just like to make a comment about moving threads. I was watching my original thread under general discussions and thinking that it was not generating any responses. It was only when that thread was deleted that I searched and re-found it here. May I suggest that the original be left in place with a prefix [Moved] on the title and a link to the new location added at the end.

 

Hi Bijoux,

Thanks for pointing that out. We do try to leave a link in the original post any time it has been moved to a different area of the forums, but we will try to be extra careful going forward to make sure that you can find your threads, especially ones as helpful for so many people as this one (thanks Tomerg!)

 

-Mike

Share this post


Link to post
Share on other sites

<p> </p>

<div>

<p>Sorry for my poor English. I've a same problem</p>

<p> </p>

<p>TECHNICAL ERROR: unable to refresh the cart. </p>

<p>Details: Error thrown: [object XMLHttpRequest] </p>

<p>Text status: parsererror</p>

<p> </p>

<p>,TECHNICAL ERROR: unable to delete product. </p>

<p> </p>

<p>& </p>

<p> </p>

<p>TECHNICAL ERROR: unable to update cart. </p>

<p> </p>

<p>Just want to share with your, i found the an error message on error_log:</p>

<p>PHP Parse error: syntax error, unexpected $end in /... /override/controllers/CartController.php on line 201</p>

<p> </p>

<p>I did renamed the file CartController_old.php and replaced my backup file into it. it work fine now.<img alt=":)" class="bbc_emoticon" src="http://www.prestashop.com/forums/public/style_emoticons/default/smile.png" title=":)" /></p>

<p> </p>

<p>but i'm still worry about the problem will come back again. Hopefully prestashop team can solve the problem well. <img alt=":(" class="bbc_emoticon" src="http://www.prestashop.com/forums/public/style_emoticons/default/sad.png" title=":(" /></p>

<p> </p>

<p>_____________</p>

<p>i'm newbie, using Prestashop 1.4.1<img alt=":lol:" class="bbc_emoticon" src="http://www.prestashop.com/forums/public/style_emoticons/default/laugh.png" title=":lol:" /></p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

</div>

 

Share this post


Link to post
Share on other sites

Hi everyone,

 

same problem happened to me. Here is how I solved the problem.

 

Go to "shipping" tab.

Click on "carriers" tab.

Re-set your default carrier on "Carrier options -> Default carrier:" -> your carrier company. Don't forget to "save"....

 

Simple but it worked for me.

Share this post


Link to post
Share on other sites

Hello to studies, I can not speak English very well, but got the module at a time ago, now I have a problem because I had to redo my shop because of a problem, it happens that the error amount void appearing when you click the Shopping Cart have researched here and I do not think the response. Can someone help me

 

when you click add to cart quantity appears null

Share this post


Link to post
Share on other sites

Hello I can not speak English very well, but I have a problem and until now could not support, I bought the module to some seven months ago but my server I just lost my files with a backup my problem is this, when I click stand error of the quantity zero, I checked the root of the problem and saw that the server had locked up json.php file, the file is reset so this error happens, can someone help me? please :(

Share this post


Link to post
Share on other sites

Hi Friends

 

I also getting same type issues in my prestashop ,

i got solution of that mb_split() finction is property of mbstring.

 

You need to update your mbstring configuration.

its handled by web host manager.

 

if you need anything help regarding that you can free mail to me jaishay@gmail.com.

 

Regards

Jay

Share this post


Link to post
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More