Create two stores. Create a product available in both stores. Add the product to both carts.

The /cart page will show both carts, but changing the second cart will actually change the first one.
This is because both carts have the same form id (constructed out of the view name and display).
We need to make the form id include the arguments as well. Either by patching core, or if that's not accepted, by creating our own Views Form implementation (just like in early Commerce 1.x, party like it's 2010!)

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Status: Active » Needs work

Working core patch posted to #2644598: Views forms can't be used multiple times on the same page, needs tests.

Test plan:
Implement a dummy views form handler which outputs a button, which when clicked outputs a message containing the first views argument.
Create a view that accepts an argument and contains the button handler.
Embed the view twice.
Ensure that clicking the button on the second view gives the correct message (instead of activating the first view).

mglaman’s picture

mglaman’s picture

Should we mark this as "Postponed" since committed on 8.1.x? Or do you want me to push forward with trying to get it committed on 8.0.x as well?

bojanz’s picture

Status: Needs work » Fixed

We didn't manage to get the patch in 8.0.x, and probably won't, now that 8.1 is in beta.
Our plan is to require Drupal 8.1 for beta1 anyway, so it doesn't matter.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.