Ejemplo n.º 1
0
 protected override void OnInit(EventArgs e)
 {
     if (this.SkinName == null)
     {
         this.SkinName = "Skin-OrderStoresSet.html";
     }
     this.from                 = this.Page.Request.QueryString["from"].ToNullString().ToLower();
     this.productSku           = this.Page.Request.QueryString["productSku"].ToNullString();
     this.buyAmount            = this.Page.Request.QueryString["buyAmount"].ToInt(0);
     this.shippingModeId       = this.Page.Request.QueryString["ShippingModeId"].ToInt(0);
     this.storeId              = this.Page.Request.QueryString["ChooseStoreId"].ToInt(0);
     this.paymentModeId        = this.Page.Request.QueryString["paymentModeId"].ToInt(0);
     this.deliveryTime         = this.Page.Request.QueryString["deliveryTime"].ToNullString();
     this.fightGroupActivityId = this.Page.Request.QueryString["fightGroupActivityId"].ToInt(0);
     if (this.deliveryTime != "任意时间" && this.deliveryTime != "工作日" && this.deliveryTime != "节假日")
     {
         this.deliveryTime = "任意时间";
     }
     if (this.shippingModeId != 0 && this.shippingModeId != -2)
     {
         this.shippingModeId = 0;
     }
     if (string.IsNullOrEmpty(this.productSku))
     {
         HttpCookie httpCookie = HiContext.Current.Context.Request.Cookies["ckids"];
         if (httpCookie != null && !string.IsNullOrEmpty(httpCookie.Value))
         {
             this.productSku = Globals.UrlDecode(httpCookie.Value);
         }
     }
     if (!string.IsNullOrEmpty(this.productSku))
     {
         string[] array = this.productSku.Split(',');
         for (int i = 0; i < array.Length; i++)
         {
             string[] array2 = array[i].Split('|');
             if (!string.IsNullOrEmpty(this.newProductSku))
             {
                 this.newProductSku += ",";
             }
             this.newProductSku += array2[0];
         }
     }
     if (this.from == "combinationbuy")
     {
         this.combinaid    = this.Page.Request.QueryString["combinaid"].ToInt(0);
         this.shoppingCart = ShoppingCartProcessor.GetCombinationShoppingCart(this.combinaid, this.productSku, this.buyAmount, true);
     }
     else
     {
         this.shoppingCart = ShoppingCartProcessor.GetShoppingCart(this.from, this.productSku, this.buyAmount, 0, true, this.storeId, this.fightGroupActivityId);
     }
     if (this.shoppingCart == null)
     {
         base.GotoResourceNotFound("购物车中没有任何商品");
     }
     else
     {
         base.OnInit(e);
     }
 }