Created
October 19, 2016 11:39
-
-
Save pavsaund/d5c46d7464f856be7da867baff3d0570 to your computer and use it in GitHub Desktop.
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
public class ShoppingCartWithCustomerTraceLogging : ShoppingCart | |
{ | |
/// <summary> | |
/// Preferred way to add item to a customers shopping cart | |
/// Will add the needed extra logging required. | |
/// </summary> | |
/// <param name="item"> A CartItem that contains the qty, sku, and item price and item total price</param> | |
public override void AddCartItem(CartItem item) | |
{ | |
base.AddCartItem(item); | |
Track(CustomerAction.CartItemAddedToCart); | |
} | |
void Track(Action action) | |
{ | |
CustomerTrackingService.SignalTotalInShoppingCartUpdated(action, CartTotal); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment