[Skip to main content](#vessel-content)

#   Add to cart only works for some varients

##

- **[beemerrider](/forum/user/906-beemerrider "View beemerrider's Profile")**
- [![beemerrider's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/906-beemerrider "View beemerrider's Profile") Topic Author
- [ Offline](/forum/user/906-beemerrider)

Less More

- Posts: 24
- Thank you received: 4
-
-

6 years 5 months ago [\#320207](#320207) by [beemerrider](/forum/user/906-beemerrider "View beemerrider's Profile")  *[Add to cart only works for some varients](/forum/27-checkout/900063-add-to-cart-only-works-for-some-varients#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&#95;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.")* was created by *[beemerrider](/forum/user/906-beemerrider "View beemerrider's Profile")*

-- url of the page with the problem -- : [ buttonshanks.com/10mm-shanks/product/but...k-10mm-acrylic-clear](https://buttonshanks.com/10mm-shanks/product/buttonback-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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMDA2My1hZGQtdG8tY2FydC1vbmx5LXdvcmtzLWZvci1zb21lLXZhcmllbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

6 years 5 months ago [\#320241](#320241) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add to cart only works for some varients](/forum/27-checkout/900063-add-to-cart-only-works-for-some-varients#320241 "-- 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&#95;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.")*

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](https://buttonshanks.com/10mm-shanks/product/updatecart/add-1/product_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](https://buttonshanks.com/10mm-shanks/product/updatecart/add-1/product_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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMDA2My1hZGQtdG8tY2FydC1vbmx5LXdvcmtzLWZvci1zb21lLXZhcmllbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[beemerrider](/forum/user/906-beemerrider "View beemerrider's Profile")**
- [![beemerrider's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/906-beemerrider "View beemerrider's Profile") Topic Author
- [ Offline](/forum/user/906-beemerrider)

Less More

- Posts: 24
- Thank you received: 4
-
-

6 years 5 months ago [\#320283](#320283) by [beemerrider](/forum/user/906-beemerrider "View beemerrider's Profile")  Replied by *[beemerrider](/forum/user/906-beemerrider "View beemerrider's Profile")* on topic *[Add to cart only works for some varients](/forum/27-checkout/900063-add-to-cart-only-works-for-some-varients#320283 "-- 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&#95;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.")*

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](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMDA2My1hZGQtdG8tY2FydC1vbmx5LXdvcmtzLWZvci1zb21lLXZhcmllbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.054 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
