Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #38 from VirtoCommerce/fix/vp-5616
Browse files Browse the repository at this point in the history
VP-5616: Fix clear cart
  • Loading branch information
pushnitsa authored Oct 29, 2020
2 parents 2bcb989 + 9e6f18e commit 50751bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions VirtoCommerce.Storefront/Domain/Cart/Demo/DemoCartBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ public override async Task<bool> AddItemAsync(AddCartItem addCartItem)
return result.IsValid;
}

public override async Task ClearAsync()
{
await base.ClearAsync();
Cart.ConfiguredGroups.Clear();
}

protected override async Task AddLineItemAsync(LineItem lineItem)
{
var existingLineItem = Cart.Items.FirstOrDefault(li => li.ProductId.EqualsInvariant(lineItem.ProductId)
Expand Down

0 comments on commit 50751bf

Please sign in to comment.