RobertSpread / spreadcart

simple plugin to display a cart for the spreadshop everywhere on your domain
1 stars 1 forks source link

#addToBasket is not the only way to add to the basket #16

Closed jtlapp closed 8 years ago

jtlapp commented 8 years ago

Sometimes SpreadShop uses the element at #addToBasket to add an element to the basket, and sometimes it's using something else. The spreadCart plugin therefore sometimes does not update.

I'm thinking that a more reliable approach is to set a timer that periodically counts the items in the cart and updates #spreadCartIcon.

jtlapp commented 8 years ago

Never mind. This is a bug I introduced. Will check in a fix shortly.

RobertSpread commented 8 years ago

I also thought on pulling every 2 seconds or so to prevent that we need to rely on #addToBasket. This would also prevent that this plugin breaks when the dev change the ID. We could do both but I think, ig you introduced the bug and you can fix it ;) , that ot should maybe a lower priority.

RobertSpread commented 8 years ago

Should we close this topic for now?

jtlapp commented 8 years ago

Oh yeah. My last push included a fix. Thanks.