Esempio n. 1
0
        private XmlDocument GetShoppingCartData()
        {
            XmlDocument xmlDocument = new XmlDocument();
            HttpCookie  httpCookie  = HiContext.Current.Context.Request.Cookies["Hid_Hishop_ShoppingCart_Data_New"];

            if (httpCookie == null || string.IsNullOrEmpty(httpCookie.Value))
            {
                xmlDocument = CookieShoppingData.CreateEmptySchema();
            }
            else
            {
                try
                {
                    xmlDocument.LoadXml(Globals.UrlDecode(httpCookie.Value));
                }
                catch
                {
                    this.ClearShoppingCart();
                    xmlDocument = CookieShoppingData.CreateEmptySchema();
                }
            }
            return(xmlDocument);
        }