Closed jtlapp closed 8 years ago
Never mind. This is a bug I introduced. Will check in a fix shortly.
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.
Should we close this topic for now?
Oh yeah. My last push included a fix. Thanks.
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.