Closed
Description
Hey,
On our design we removed the span styles from the minicart "remove" and "edit" links which add the icon. This means that, because the span now has no styles (just shows the text) when you click the link the code in the JS to remove the item now finds the span not the a tag which contains the item id to remove and be sent with the post.
This took me a while to debug and I'm sure others may fall into the same trap. Perhaps something like this would be better.
_removeItem: function(elem) {
if(elem.prop('tagName') !== 'A') {
elem = elem.parent('a');
}
var itemId = elem.data('cart-item');
this._ajax(this.options.url.remove, {
item_id: itemId
}, elem, this._removeItemAfter);
},
Thanks