Esempio n. 1
0
 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);
     }
 }