easydigitaldownloads/Easy-Digital-Downloads — pull request #2486 by mintplugins (2014-08-06 04:18:05+00:00)
Title: Fixed incorrect remove by ajax cart IDs and amounts

When removing an item from the cart widget, it was removing the item we wanted it to, but not resetting the cart ID (data-cart-item). This means that if you had 3 items in the cart(0, 1, 2) and removed item 1, the items left were still labelled as 0 and 2, rather than 0 and 1. This meant that if you, then, removed item 3, it didn't exist. It would get removed from the screen using javascript BUT it didn't actually get removed from the PHP session. If you then refreshed the page you would see that the item is still in your cart - even though you thought you had removed it. This solves that problem by re-assigned the right data-cart-item ids after an item is removed.