Basket Recalculate() Generates new BasketItems
Posted: Thu Jan 20, 2011 11:29 am
Hello.
I have this code to add Basket Items to my Basket:
BasketItem bi = new BasketItem();
bi.ProductId = productId;
bi.Quantity = (short)(bi.Quantity + 1);
this.CurrentBasket.Items.Add(bi);
this.CurrentBasket.Save();
this.CurrentBasket.Recalculate();
Before the Recalculate I have Count=1 in this.CurrentBasket.Items, after I have 3.
Any idea why this happens? Am I creating correctly the BasketItem?
Thanks ,
Bruno Martinho
I have this code to add Basket Items to my Basket:
BasketItem bi = new BasketItem();
bi.ProductId = productId;
bi.Quantity = (short)(bi.Quantity + 1);
this.CurrentBasket.Items.Add(bi);
this.CurrentBasket.Save();
this.CurrentBasket.Recalculate();
Before the Recalculate I have Count=1 in this.CurrentBasket.Items, after I have 3.
Any idea why this happens? Am I creating correctly the BasketItem?
Thanks ,
Bruno Martinho