diff --git a/src/Merchello.Web/Workflow/CustomerItemCache/CustomerItemCacheBase.cs b/src/Merchello.Web/Workflow/CustomerItemCache/CustomerItemCacheBase.cs index facf312962..4e6771cb8d 100644 --- a/src/Merchello.Web/Workflow/CustomerItemCache/CustomerItemCacheBase.cs +++ b/src/Merchello.Web/Workflow/CustomerItemCache/CustomerItemCacheBase.cs @@ -571,6 +571,22 @@ public void AddItem(IItemCacheLineItem lineItem) AddedItem.RaiseEvent(new Core.Events.NewEventArgs(lineItem), this); } + /// + /// Updates price + /// + /// + /// + public void UpdatePrice(string sku, decimal price) + { + if (!_itemCache.Items.Contains(sku)) return; + + UpdatingItem.RaiseEvent(new UpdateItemEventArgs(_itemCache.Items[sku]), this); + + _itemCache.Items[sku].Price = price; + + UpdatedItem.RaiseEvent(new UpdateItemEventArgs(_itemCache.Items[sku]), this); + } + /// /// Updates a customer item cache item's quantity /// diff --git a/src/Merchello.Web/Workflow/CustomerItemCache/ICustomerItemCacheBase.cs b/src/Merchello.Web/Workflow/CustomerItemCache/ICustomerItemCacheBase.cs index 0804e0977d..5899b33e6e 100644 --- a/src/Merchello.Web/Workflow/CustomerItemCache/ICustomerItemCacheBase.cs +++ b/src/Merchello.Web/Workflow/CustomerItemCache/ICustomerItemCacheBase.cs @@ -323,6 +323,13 @@ public interface ICustomerItemCacheBase /// void UpdateQuantity(string sku, int quantity); + /// + /// Update price + /// + /// + /// + void UpdatePrice(string sku, decimal price); + /// /// Updates the quantity of an item in the item cache ///