ngCart icon indicating copy to clipboard operation
ngCart copied to clipboard

Multiple tab usage makes for erratic cart behaviour

Open atomworks opened this issue 10 years ago • 0 comments

I and presumably many other people often shop with multiple products open in multiple tabs. If you do this however with ngCart the data doesn't stay synchronised between.

Example:

[Tab One] 3x Item A [Tab Two] 3x item A

While in tab two we decide to add one of item B

[Tab One] 3x Item A [Tab Two] 3x item A, 1x item B

We go to tab one where one of item C is open and add that to cart

[Tab One] 3x Item A, 1x item C [Tab Two] 3x item A, 1x item B

Now we go to checkout the cart contains...

[Checkout - Either tab] 3x Item A, 1x item C

Obviously this can get a lot more complexed and confusing. I've found a solution, I'll do a pull request to accompany this. We basic restore when the tab is focused then run a digest to make sure the appropriate scopes update.

atomworks avatar Jan 29 '16 16:01 atomworks