Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed "Adding a relationship with an entity which is in the Deleted state is not allowed" when adding bundles to cart. Fixed price calculation of multiple bundles issue. Fixed auto add required products for bundle items.
- Loading branch information
Showing
12 changed files
with
327 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/Libraries/SmartStore.Services/Orders/AddToCartContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System.Collections.Generic; | ||
using System.Collections.Specialized; | ||
using SmartStore.Core.Domain.Catalog; | ||
using SmartStore.Core.Domain.Customers; | ||
using SmartStore.Core.Domain.Orders; | ||
|
||
namespace SmartStore.Services.Orders | ||
{ | ||
public class AddToCartContext | ||
{ | ||
public AddToCartContext() | ||
{ | ||
Warnings = new List<string>(); | ||
CustomerEnteredPrice = decimal.Zero; | ||
ChildItems = new List<ShoppingCartItem>(); | ||
} | ||
|
||
public List<string> Warnings { get; set; } | ||
|
||
public ShoppingCartItem Item { get; set; } | ||
public List<ShoppingCartItem> ChildItems { get; set; } | ||
public ProductBundleItem BundleItem { get; set; } | ||
|
||
public Customer Customer { get; set; } | ||
public Product Product { get; set; } | ||
public ShoppingCartType CartType { get; set; } | ||
public NameValueCollection AttributeForm { get; set; } | ||
public string Attributes { get; set; } | ||
public decimal CustomerEnteredPrice { get; set; } | ||
public int Quantity { get; set; } | ||
public bool AddRequiredProducts { get; set; } | ||
public int? StoreId { get; set; } | ||
|
||
public int BundleItemId | ||
{ | ||
get | ||
{ | ||
return (BundleItem == null ? 0 : BundleItem.Id); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.