Cart Manager is incorrectly combining order items with promotions

Created on 16 September 2024, 7 months ago

The Cart Manager is incorrectly combining order items with promotions

When creating a "BuyXGetY" promotion to offer a second product for free, if the user manually tries to add this second product to the cart, it gets combined with the order item generated by the promotion. During the cart refresh process, this extra unit is lost when the promotions are reapplied.

I'm not sure where to create the failing test, as BuyXGetYTest doesn't use the Cart Manager or have dependencies on the cart module.

Steps to reproduce it

  • Create a BuyXGetY promotion, where when one unit of product X is purchased, one unit of product Y is obtained for free.
  • Add one unit of product X to the cart; one unit of product Y is automatically added to the cart.
  • Try adding one unit of product Y to the cart manually. Upon refreshing the cart, there is only one unit of product Y.
🐛 Bug report
Status

Active

Version

2.0

Component

Cart

Created by

🇪🇸Spain facine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @facine
  • 🇪🇸Spain facine

    facine changed the visibility of the branch 3474765-cart-manager-is to hidden.

  • Pipeline finished with Failed
    7 months ago
    Total: 557s
    #284691
  • Pipeline finished with Failed
    7 months ago
    Total: 591s
    #284692
  • 🇮🇱Israel jsacksick

    I think the fix is correct, no need to specify 1 after continue as it is the default value.
    I just wished there was a way for the cart module to not hardcode the flag, but I guess we can live with that.

  • Pipeline finished with Failed
    7 months ago
    Total: 900s
    #290293
  • Pipeline finished with Failed
    6 months ago
    Total: 556s
    #296607
  • Pipeline finished with Failed
    6 months ago
    #297038
  • Pipeline finished with Failed
    6 months ago
    #297146
  • Pipeline finished with Failed
    6 months ago
    Total: 492s
    #297727
  • Pipeline finished with Failed
    6 months ago
    Total: 556s
    #297851
  • Pipeline finished with Failed
    6 months ago
    Total: 452s
    #297870
  • Pipeline finished with Failed
    6 months ago
    Total: 452s
    #297901
  • Pipeline finished with Success
    6 months ago
    Total: 771s
    #297906
  • Pipeline finished with Success
    6 months ago
    Total: 509s
    #297921
  • Pipeline finished with Success
    6 months ago
    Total: 467s
    #297934
  • Pipeline finished with Failed
    6 months ago
    Total: 551s
    #299571
  • Pipeline finished with Canceled
    6 months ago
    Total: 141s
    #299768
  • Pipeline finished with Failed
    6 months ago
    Total: 452s
    #299770
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Failed
    6 months ago
    Total: 6268s
    #303610
  • Pipeline finished with Success
    6 months ago
    Total: 533s
    #307363
  • Pipeline finished with Success
    6 months ago
    #307382
  • Pipeline finished with Failed
    6 months ago
    #310265
  • Pipeline finished with Success
    6 months ago
    #310366
  • Pipeline finished with Success
    4 months ago
    Total: 188s
    #366724
  • Pipeline finished with Success
    4 months ago
    Total: 162s
    #366729
  • Pipeline finished with Success
    4 months ago
    Total: 157s
    #366776
  • Pipeline finished with Success
    4 months ago
    Total: 157s
    #366777
  • Pipeline finished with Success
    4 months ago
    Total: 592s
    #372666
  • Pipeline finished with Success
    4 months ago
    Total: 628s
    #372672
  • Pipeline finished with Failed
    4 months ago
    Total: 270s
    #372741
  • Pipeline finished with Failed
    4 months ago
    Total: 3718s
    #372747
  • Pipeline finished with Skipped
    4 months ago
    #373076
Production build 0.71.5 2024