Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false);
        HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
        HttpContext.Current.Response.Cache.SetNoStore();
        Response.Cache.SetExpires(DateTime.Now);
        Response.Cache.SetValidUntilExpires(true);

        GetPortalCommonInfo(out StoreID, out PortalID, out CustomerID, out UserName, out CultureName, out SessionCode);
        aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName, CustomerID, SessionCode);

        UserModuleIDCart = int.Parse(SageUserModuleID);

        try
        {
            CartModulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
            SageFrameConfig pagebase = new SageFrameConfig();

            string             template = TemplateName;
            StoreSettingConfig ssc      = new StoreSettingConfig();
            ssc.GetStoreSettingParamNine(StoreSetting.DefaultProductImageURL,
                                         StoreSetting.AllowMultipleShippingAddress,
                                         StoreSetting.ShowItemImagesInCart,
                                         StoreSetting.MinimumCartSubTotalAmount,
                                         StoreSetting.AllowOutStockPurchase,
                                         StoreSetting.MultiCheckOutURL,
                                         StoreSetting.AllowShippingRateEstimate,
                                         StoreSetting.AllowCouponDiscount,
                                         StoreSetting.AllowRealTimeNotifications,
                                         out NoImageMyCartPath,
                                         out AllowMultipleAddShipping,
                                         out ShowItemImagesOnCart,
                                         out MinCartSubTotalAmount,
                                         out AllowOutStockPurchase,
                                         out MultipleAddressChkOutURL,
                                         out AllowShippingRateEstimate,
                                         out AllowCouponDiscount,
                                         out AllowRealTimeNotifications,
                                         StoreID,
                                         PortalID,
                                         CultureName
                                         );

            if (!IsPostBack)
            {
                IncludeCss("MyCart", "/Templates/" + template + "/css/GridView/tablesort.css",
                           "/Templates/" + template + "/css/MessageBox/style.css",
                           "/Templates/", template, "/css/ToolTip/tooltip.css",
                           "/Modules/AspxCommerce/AspxCart/css/module.css");
                IncludeJs("MyCart", "/Modules/AspxCommerce/AspxCart/js/MyCart.js", "/js/encoder.js", "/js/MessageBox/alertbox.js", "/js/jquery.easing.1.3.js", "/js/jquery.tipsy.js", "/js/Session.js");
            }
            DisplayCartItems(template);
            IncludeLanguageJS();
            CouponInfo();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }