Jump to content

[bug reported] Technical error - Unabled to add product


Recommended Posts

I also get this error with 1.1final.

In my case, this error will happen when I try to add product with many attributes but none of them are in stock.

Here is the situation:
Product A have 2 colors, black in stock, white out of stock ---> add to cart success
Fire Bug console response return:

http://localhost/prestashop/cart.php?_=1230139191382&add;&ajax;=true&qty=1&id_product=37&token=a942e3b5bcf94f4d054d286df7433eaa



Product B have 2 colors, none of them instock, ---> TECHNICAL ERROR: unable to add the product. Error thrown: [object XMLHttpRequest] Text status: parsererror
Fire Bug console response return:

http://localhost/prestashop/cart.php?_=1230139287961&add;&ajax;=true&qty=1&id_product=36&token=a942e3b5bcf94f4d054d286df7433eaa



This add to cart error will only happen in the product listing page. It will not appear when I try to add in it's own product page.
Fire Bug console response return:

http://localhost/prestashop/cart.php?_=1230139421446&add;&ajax;=true&qty=1&id_product=36&token=a942e3b5bcf94f4d054d286df7433eaa&ipa=143




Any body got idea on how to fix this? I will wait a few days before I report it as a bug.

Link to comment
Share on other sites

I think the only logic that broken is the product attribute choosing when no attribute is selected. Everything else is fine and I am certain that stock management is not relate to this issue.

I try to turn of AJAX cart off and then add product to cart (from product listing page) in the following scenario:
product with multiple attributes, some of the attributes instock ---> it will take you directly to checkout page
product with multiple attributes, none of them instock ---> it will take you to product page and await for your choice of attribute

I don't get the blank page. and the customers shopping experience is not interrupted by error msg when AJAX is off. So this should be my temporary fix.

Link to comment
Share on other sites

Ah.. I also submitted this bug. My bug number is 1143. Sorry I didn't let you guys (who share the same problems) know.

I have no knowledge of coding but I think the add to cart logic should be like this:
1) if there is no combination --> add item to cart (regardless of stock status)
2) if there are combinations --> take customer to product page and let them choose for their combination (don’t force to add something to cart or ajax cart regardless of stock status)
This way customers experience will be smooth and it should be easy for coding too.

Anyway, thanks for Presta Team for their effort. Since the bug was reported, let's sit back and wait for another release.

Link to comment
Share on other sites

  • 3 weeks later...

I replaced Product.php with the version from subversion, and it corrects the problem, however now all pages are blank whenever a user is logged in. So this fix really isn't a fix.

Lircky, you can just go to http://svn.prestashop.com/trunk/ and navigate it via your browser instead of using subversion.

Edit: I've been able to fix the bug by disabling ajax, but I also had to unfortunately disable the security token or else I would get errors about hack attempts when adding an item to the cart.

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...
  • 1 month later...
  • 4 months later...

Hi,

I have also this problem in version 1.2.4. Although I make the correct CHMOD in all directories, it doesn't works.
Blank page is still alive ;) If I turn off ajax cart the problem is the same.
I'm gonna try in a different hosting.

Anything else ?

Best regards

Link to comment
Share on other sites

×
×
  • Create New...