[shop_events_listener] Error when adding product by /cart/add.js

New Member
3 0 0

Hi, In the frontend I'm using React and when I try to add product with add.js and axios, the product is added but, I'm getting a notice.

[shop_events_listener] Error in handleXhrDone:  Inconsistent IDs between server response and request payload

I have searched a lot but don't found any solution. Here is my code:

let data = {
    items: [{
        quantity: 1,
        id: variantId,//comes from product
    }]
}
axios.post('/cart/add.js', data )
.then(res => {
    console.log(res);
}).catch(error => {
    console.log(error.response.data.message)
});
0 Likes
Highlighted
New Member
3 0 0

Still finding solution for this

0 Likes