Add to cart only works for some varients

  • Posts: 24
  • Thank you received: 4
3 years 10 months ago #320207

-- url of the page with the problem -- : buttonshanks.com/10mm-shanks/product/but...k-10mm-acrylic-clear
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.2.29
-- Browser(s) name and version -- : Chrome 81
-- Error-message(debug-mod must be tuned on) -- : cart_id was not returned in addToCart AJAX call

The first three variants are able to be added to the cart. The last two, quantity 100 and 500 will not add to cart.

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
3 years 10 months ago #320241

Hi,

I see that the issue is that if you open the link of a variant for which the add to cart works, you get the json response as expected:
buttonshanks.com/10mm-shanks/product/upd...duct_id-167?tmpl=raw
But if you do the same for a variant for which the add to cart doesn't work, you get a 404 error page:
buttonshanks.com/10mm-shanks/product/upd...duct_id-165?tmpl=raw
(and that's why the javascript displays that "cart_id was not returned in addToCart AJAX call" error in the console)
So the issue looks like a SEF issue, not an add to cart issue.
Do you use a SEF extension like sh404SEF ? Do you have any caching system on your website ?
I'm suspecting that the issue might be related to the cache of the SEF URLs or something like that.

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 4
3 years 10 months ago #320283

I have the issue fixed now.

I was thinking the same thing about sh404SEF, which is installed. I had cleared all URLs that were related to the product in anyway before posting the support ticket. So after you mentioned sh404SEF I was much more aggressive in purging URLs, and aliases. After deleting anything related to the product category, then the entire category threw a 404 error. So I purged all URL's and aliases and let sh404SEF rebuild the URL's. That solved my new issue and the support ticket issue.

Thank you for pointing me in the correct direction.

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum