예제 #1
0
            /// <summary>
            /// Gets the cart identifier from request cookie.
            /// </summary>
            /// <param name="httpContextBase">The HTTP context base.</param>
            /// <param name="sessionType">Type of the session.</param>
            /// <returns>The cart identifier.</returns>
            public static string GetCartIdFromRequestCookie(HttpContextBase httpContextBase, SessionType sessionType)
            {
                if (httpContextBase == null)
                {
                    throw new ArgumentNullException(nameof(httpContextBase));
                }

                string cookieName = GetCartTokenCookieName(sessionType);
                string cartId     = CookieManager.GetRequestCookieValue(httpContextBase.ApplicationInstance.Context, cookieName);

                return(cartId);
            }