All things Shopify and commerce
There appears to be a critical bug in /cart/add that started last week. When calling it the first time for a variant, the response includes all the right stuff
{"id":43933737844898,"properties":{},"quantity":1,"variant_id":43933737844898, "sections":...
but calling it the second time for the same variant (when that variant is already in cart), the response only includes sections
{"sections":{"cart-drawer":"\u003cdi...
without any product details. Sending the same exact payload.
TypeError: Cannot read properties of null (reading 'innerHTML')
at CartNotification.getSectionInnerHTML (cart-notification.js?v=133508293167896966491686237166:81:86)
at cart-notification.js?v=133508293167896966491686237166:55:60
at Array.forEach (<anonymous>)
at CartNotification.renderContents (cart-notification.js?v=133508293167896966491686237166:54:32)
at product-form.js?v=138816392078825582251686237168:96:25
Solved! Go to the solution
This is an accepted solution.
Shopify fixed the bug.
I'm seeing the same behaviour in my Dawn theme production & development stores as well as Dawn demo store. @RobFarmLink Did you notice this starting last week already and you know it's not default behaviour? I noticed this behaviour just today so I couldn't tell if it's a bug or working as it should, albeit oddly.
Thank you!
Hi, I am facing the same problem. It seems that the ajax cart API returns an empty item list when adding items that are already in the cart. We noticed this behavior yesterday.
@teemukostamo wrote:so I couldn't tell if it's a bug or working as it should, albeit oddly.
According to the Shopify documentation, it is not working as it should: https://shopify.dev/docs/api/ajax/reference/cart#response
Kind regards
This is an accepted solution.
Shopify fixed the bug.
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025