I'm making a pos system. looking for a product in the search bar or entering the barcode, I create ajax requests: add the product to the cart (insert in pos) load the list in the cart (select pos)
the problem I'm seeing is that when I load the list, sometimes it skips the update request. i tried to use
$.when(func of add product).then(func of load list);
and
$.ajax(... func of add product).done(func of load list);
but nothing. How is it possible?