public static string GetCurrentCartID(Store currentStore) { string result = string.Empty; result = GetCookieString(WebAppSettings.CookieNameCartId(currentStore.Id), currentStore); return(result); }
public static void SaveOrderCookies(Orders.Order o, Store currentStore) { if (o.IsPlaced) { // Clear Cookies SetCookieString(WebAppSettings.CookieNameCartId(currentStore.Id), string.Empty, currentStore); SetCookieString(WebAppSettings.CookieNameCartItemCount(currentStore.Id), "0", currentStore); SetCookieString(WebAppSettings.CookieNameCartSubTotal(currentStore.Id), "0", currentStore); } else { // Save Cart Cookie SetCookieString(WebAppSettings.CookieNameCartId(currentStore.Id), o.bvin, currentStore); SetCookieString(WebAppSettings.CookieNameCartItemCount(currentStore.Id), Math.Round(o.TotalQuantity, 0).ToString(), currentStore); SetCookieString(WebAppSettings.CookieNameCartSubTotal(currentStore.Id), o.TotalOrderAfterDiscounts.ToString("c"), currentStore); } }
public static void SetCurrentCartId(Store currentStore, string value) { SetCookieString(WebAppSettings.CookieNameCartId(currentStore.Id), value, currentStore); }