We have a site where you are allowed to create carts that you pay for (using order type default) and orders of type "reservation", where you physically go to the store and pick it up and pay.

So, let's say a user (logged in) has one regular cart with "item 1" in it.

Then in another tab (not logged in) the same person creates a reservation order with "item 2". They decide to log in. I would expect they end up with 2 orders now (one was the stored one, with "item 1", and the other one is the reservation order with "item 2").

So, I would like commerce combine carts to combine carts only of the same type. Would you accept a patch doing this?

CommentFileSizeAuthor
#3 3046115.patch2.67 KBeiriksm

Comments

eiriksm created an issue. See original summary.

replicaobscura’s picture

I agree with your reasoning and approach. I would really appreciate a patch to resolve this issue. Thanks for your report and assistance in resolving the issue!

eiriksm’s picture

Status: Active » Needs review
StatusFileSize
new2.67 KB

Patch attached

replicaobscura’s picture

I think this looks good to me, but I'm curious if anyone else has had a chance to test it in other configurations. I will install and review this myself and get it merged in ASAP too. Thanks for the patch!

replicaobscura’s picture

Almost forgot that I was going to merge in your other patch for creating the test first. I'll get that done and then return to this ASAP.

soliyappan’s picture

I tested this patch. It's working as expected.

Thanks for the patch.

replicaobscura’s picture

Can we get some more testing on this now that several other patches have been merged into the module? I'd like to get this merged ASAP but would love for it to be RTBC first.

  • bmcclure committed 04613b5 on 8.x-1.x authored by eiriksm
    Issue #3046115 by eiriksm, bmcclure, soliyappan: Creates unintuitive...
replicaobscura’s picture

Status: Needs review » Fixed

This has been pushed to dev now (I also removed the old getMainCart method since it wasn't called by anything anymore).

Status: Fixed » Closed (fixed)

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