Open nstephenh opened 1 month ago
Unfortunately when we merge a cart we don't actually save the information on what cart it was merged into so there's no record of which cart we merged into and we can't investigate point 1.
On merging it should copy the code, or otherwise keep the code if this cart was the cart it was merging into:
if not self.discount_code and cart2.discount_code:
cart2.discount_code.validate_code_for_cart(self)
self.save()
I've added a "merge target" field in b64de80f9807c1c64213f3f6916c16f2bdacbf36
Which I think doesn't do anything because we clear the code off the old cart. It was an issue with cart 238256, merged from 237799. Will see if I can reproduce with a local terminal
Looking at that cart, there was a discount code message of eob2410 has expired, so I think that code was on the cart and we didn't overwrite it because of that. So we either need to check to see which code is more valid or disregard the "not self.discount_code" indicator.
Investigate the past, write a script looking at merged carts and discount codes on them vs discount codes on the cart they were merged into.
Write tests for each case (which cart had the code, etc.
Fix the problem.