Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             storeID = GetStoreID;
             portalID = GetPortalID;
             customerID = GetCustomerID;
             userName = GetUsername;
             cultureName = GetCurrentCultureName;
             if (HttpContext.Current.Session.SessionID != null)
             {
                 sessionCode = HttpContext.Current.Session.SessionID.ToString();
             }
             userIP = HttpContext.Current.Request.UserHostAddress;
             IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
             ipToCountry.GetCountry(userIP, out countryName);
             enableCompareItems = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableCompareItems, storeID, portalID, cultureName);
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeJs("ItemCompareDetails", "/js/Templating/tmpl.js", "/js/jquery.cookie.js");
                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }
                UserIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIP, out CountryName);

                StoreSettingConfig ssc = new StoreSettingConfig();
                NoImageItemComparePath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
                AllowWishListItemCompareDetail = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID, CultureName);            
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("AdvanceSearch", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/JQueryUI/jquery.ui.all.css", "/Templates/" + TemplateName + "/css/PopUp/style.css");
                IncludeJs("AdvanceSearch", "/js/JQueryUI/jquery-ui-1.8.10.custom.js", "/js/PopUp/custom.js", "/Modules/AspxCommerce/AspxGeneralSearch/js/AdvanceSearch.js");
                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                UserIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIP, out CountryName);

                StoreSettingConfig ssc = new StoreSettingConfig();
                NoImageAdSearchPath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
                AllowWishListAdvSearch = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID, CultureName);

            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                storeID = GetStoreID;
                portalID = GetPortalID;
                customerID = GetCustomerID;
                userName = GetUsername;
                cultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    sessionCode = HttpContext.Current.Session.SessionID.ToString();
                }
                userIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(userIP, out countryName);
				noImageItemComparePath = StoreSetting.GetStoreSettingValueByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
                allowOutStockPurchase = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);
                allowWishListItemCompareDetail = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableWishList,storeID,portalID,cultureName);
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    protected void Page_Init(object sender, EventArgs e)
    {
        try
        {
            userIP = HttpContext.Current.Request.UserHostAddress;
            IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
            ipToCountry.GetCountry(userIP, out countryName);
            InitializeJS();

            string strTemplatePath = "";
            ArrayList cssList = new ArrayList();
            cssList.Add("~/Templates/" + TemplateName + "/css/GridView/tablesort.css");
            cssList.Add("~/Templates/" + TemplateName + "/css/MessageBox/style.css");
            cssList.Add("~/Templates/" + TemplateName + "/css/StarRating/jquery.rating.css");
            foreach (string css in cssList)
            {
                strTemplatePath = css;
                IncludeCssFile(strTemplatePath);
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
 public void GetTopFiveCountryName()
 {
     string startDate = DateTime.Now.Subtract(new TimeSpan(20, 0, 0, 0, 0)).ToShortDateString();
     string endDate = DateTime.Now.ToShortDateString();
     List<DashBoardSettingInfo> lstTopVisitedCountry = DashBoardController.GetTopFiveVisitedCountry(startDate, endDate);
     string CountryName;
     IPAddressToCountryResolver objIP = new IPAddressToCountryResolver();
     List<string> topCountryArray = new List<string>();
     int totalVisitors = 0;
     foreach (DashBoardSettingInfo obj in lstTopVisitedCountry)
     {
         objIP.GetCountry(obj.Country, out CountryName);
         if (CountryName == null)
         {
             obj.Country = obj.Country;
         }
         else
         {
             obj.Country = CountryName;
         }
         topCountryArray.Add(obj.Country);
         topCountryArray.Add(obj.VisitTime);
         totalVisitors += Int16.Parse(obj.VisitTime);
     }
     topCountry = string.Join(",", topCountryArray.ToArray());
     ltrTotal.Text = "<label>Total Visitors:  " + totalVisitors + "</label>";
 }
Пример #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
           
            if (!IsPostBack)
            {
                IncludeCss("ItemsCompare", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css"); 
                IncludeJs("ItemsCompare", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/js/PopUp/custom.js", "/js/jquery.cookie.js",
                    "/Modules/AspxCommerce/AspxItemsCompare/js/ItemsCompare.js");
                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }
                UserIp = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIp, out CountryName);

                StoreSettingConfig ssc = new StoreSettingConfig();
                EnableCompareItems = ssc.GetStoreSettingsByKey(StoreSetting.EnableCompareItems, StoreID, PortalID, CultureName);
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
 protected void Page_Init(object sender, EventArgs e)
 {
     try
     {
         UserIP = HttpContext.Current.Request.UserHostAddress;
         IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
         ipToCountry.GetCountry(UserIP, out CountryName);
         InitializeJS();
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         StoreID = GetStoreID;
         PortalID = GetPortalID;
         CustomerID = GetCustomerID;
         UserName = GetUsername;
         CultureName = GetCurrentCultureName;
         aspxfilePath = ResolveUrl("~") + "Modules/AspxCommerce/AspxItemsManagement/";
         IncludeCss("GirdCardAll","/Templates/" + TemplateName + "/css/ToolTip/tooltip.css");
         IncludeJs("GirdCardAll", "/js/Paging/jquery.pagination.js", "/js/jquery.tipsy.js");
         if (HttpContext.Current.Session.SessionID != null)
         {
             SessionCode = HttpContext.Current.Session.SessionID.ToString();
         }
         if (HttpContext.Current.Session.SessionID != null)
         {
             SessionCode = HttpContext.Current.Session.SessionID.ToString();
         }
         if (SageUserModuleID != "")
         {
             UserModuleID = int.Parse(SageUserModuleID);
         }
         else
         {
             UserModuleID = 0;
         }
         UserIp = HttpContext.Current.Request.UserHostAddress;
         IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
         ipToCountry.GetCountry(UserIp, out CountryName);
         StoreSettingConfig ssc = new StoreSettingConfig();
         AllowAddToCart = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, StoreID, PortalID, CultureName);
         DefaultImagePath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID,
                                                      CultureName);                     
         AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID,
                                                           CultureName);
         MaxCompareItemCount =
             int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.MaxNoOfItemsToCompare, StoreID, PortalID, CultureName));
         NoOfItemsInARow = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfDisplayItems, StoreID, PortalID, CultureName));
                  
         GetAllGiftCards();
         IncludeLanguageJS();
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
 protected void page_init(object sender, EventArgs e)
 {
     try
     {
         SageFrameConfig pagebase = new SageFrameConfig();
         IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
         UserIp = HttpContext.Current.Request.UserHostAddress;
         IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
         ipToCountry.GetCountry(UserIp, out CountryName);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("ViewTagsItems", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/ToolTip/tooltip.css", "/Templates/" + TemplateName + "/css/FancyDropDown/fancy.css");
                IncludeJs("ViewTagsItems", "/js/Templating/tmpl.js",
                        "/js/encoder.js", "/js/Paging/jquery.pagination.js",
                           "/js/Templating/AspxTemplate.js",
                           "/js/MessageBox/jquery.easing.1.3.js",
                           "/js/MessageBox/alertbox.js", "/js/jquery.tipsy.js",
                           "/js/FancyDropDown/itemFancyDropdown.js",
                           "/js/SageFrameCorejs/itemTemplateView.js",
                           "/Modules/AspxCommerce/AspxPopularTags/js/ViewTaggedItem.js");
                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;
                PopularTagsModulePath = ResolveUrl((this.AppRelativeTemplateSourceDirectory));
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                UserIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIP, out CountryName);           

                TagsIDs = Request.QueryString["tagsId"];

                StoreSettingConfig ssc = new StoreSettingConfig();
                NoImageTagItemsPath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowAddToCart = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);            
                ItemDisplayMode = ssc.GetStoreSettingsByKey(StoreSetting.ItemDisplayMode, StoreID, PortalID, CultureName);
                IncludeLanguageJS();
                GetAspxTemplates();
            }
            IncludeLanguageJS();

        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("ItemLists", "/Templates/" + TemplateName + "/css/MessageBox/style.css",
                    "/Templates/" + TemplateName + "/css/ToolTip/tooltip.css", "/Templates/" + TemplateName + "/css/FancyDropDown/fancy.css");
                IncludeJs("ItemLists", "/js/Templating/tmpl.js", "/js/encoder.js", "/js/Paging/jquery.pagination.js",
               "/js/Templating/AspxTemplate.js");
                IncludeJs("ItemLists", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js",
                    "/js/jquery.tipsy.js", "/js/FancyDropDown/itemFancyDropdown.js", "/js/SageFrameCorejs/itemTemplateView.js");

                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                UserIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIP, out CountryName);

                CategoryID = Int32.Parse(Request.QueryString["cid"]);
                SearchText = Request.QueryString["q"];
                IsGiftCard = bool.Parse(Request.QueryString["isgiftcard"]);
                hst = AppLocalized.getLocale(this.AppRelativeTemplateSourceDirectory);
                this.Page.Title = getLocale("Search") + " - " + SearchText;
                StoreSettingConfig ssc = new StoreSettingConfig();
                NoImageItemListPath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowAddToCart = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);               
                NoOfItemsInARow = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfDisplayItems, StoreID, PortalID, CultureName));
                ItemDisplayMode = ssc.GetStoreSettingsByKey(StoreSetting.ItemDisplayMode, StoreID, PortalID, CultureName);
            }
            GetAspxTemplates();
            IncludeLanguageJS();

        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("ItemsListByIds", "/Templates/" + TemplateName + "/css/MessageBox/style.css", 
                    "/Templates/" + TemplateName + "/css/ToolTip/tooltip.css", "/Templates/" + TemplateName + "/css/FancyDropDown/fancy.css");
                IncludeJs("ItemsListByIds", "/js/jquery.cookie.js", "/js/Templating/tmpl.js",
                        "/js/encoder.js", "/js/Paging/jquery.pagination.js",
                           "/js/Templating/AspxTemplate.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js",
                           "/js/jquery.tipsy.js", "/js/FancyDropDown/itemFancyDropdown.js", "/js/SageFrameCorejs/itemTemplateView.js");
                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;

                StoreSettingConfig ssc = new StoreSettingConfig();
                DefaultShoppingOptionImgPath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowAddToCart = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);               
                NoOfItemsInARow = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfDisplayItems, StoreID, PortalID, CultureName));
                ItemDisplayMode = ssc.GetStoreSettingsByKey(StoreSetting.ItemDisplayMode, StoreID, PortalID, CultureName);
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                UserIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIP, out CountryName);

                 ItemIds = Request.QueryString["id"];
                 IncludeLanguageJS();
                GetAspxTemplates();
            }
            IncludeLanguageJS();

            
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #14
0
    protected void page_init(object sender, EventArgs e)
    {
        try
        {
            // categoryId = "";// Int32.Parse(Request.QueryString["catId"]);
            // categoryName = ""; // Request.QueryString["catName"];
            SageFrameRoute parentPage = (SageFrameRoute)this.Page;
            categorykey = parentPage.Key;
            if (!IsPostBack)
            {
                storeID = GetStoreID;
                portalID = GetPortalID;
                customerID = GetCustomerID;
                userName = GetUsername;
                cultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    sessionCode = HttpContext.Current.Session.SessionID.ToString();
                }
                OverRideSEOInfo(categorykey, storeID, portalID, userName, cultureName);

                userIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(userIP, out countryName);
				noImageCategoryDetailPath = StoreSetting.GetStoreSettingValueByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
                allowOutStockPurchase = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);
                allowWishListCategory = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableWishList,storeID,portalID,cultureName);
            }
            
            InitializeJS();
            string strTemplatePath = "";
            ArrayList cssList = new ArrayList();
            cssList.Add("~/Templates/" + TemplateName + "/css/MessageBox/style.css");
            foreach (string css in cssList)
            {
                strTemplatePath = css;
                IncludeCssFile(strTemplatePath);
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("LatestItems", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Modules/AspxCommerce/AspxLatestItems/latestitems.css");
                IncludeJs("LatestItems", "/js/DateTime/date.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/js/CurrencyFormat/jquery.formatCurrency-1.4.0.js", "/js/CurrencyFormat/jquery.formatCurrency.all.js",
                    "/Modules/AspxCommerce/AspxLatestItems/js/LatestItems.js", "/Modules/AspxCommerce/AspxLatestItems/js/jquery.tipsy.js");

                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                //StoreSettingInfo DefaultStoreSettings = (StoreSettingInfo)Session["DefaultStoreSettings"];
                //DefaultStoreSettings.AllowAnonymousCheckOut
                UserIp = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIp, out CountryName);

               StoreSettingConfig ssc = new StoreSettingConfig();
               DefaultImagePath= ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
               NoOfLatestItems = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfLatestItemsDisplay, StoreID, PortalID, CultureName));
               EnableLatestItems = ssc.GetStoreSettingsByKey(StoreSetting.EnableLatestItems, StoreID, PortalID, CultureName);
               AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
               MaxCompareItemCount = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.MaxNoOfItemsToCompare, StoreID, PortalID, CultureName));
               NoOfLatestItemsInARow = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfLatestItemsInARow, StoreID, PortalID, CultureName));
               AllowWishListLatestItem = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID, CultureName);
               AllowAddToCompareLatest = ssc.GetStoreSettingsByKey(StoreSetting.EnableCompareItems, StoreID, PortalID, CultureName);
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    protected void page_init(object sender, EventArgs e)
    {
        try
        {
            // categoryId = "";// Int32.Parse(Request.QueryString["catId"]);
            // categoryName = ""; // Request.QueryString["catName"];
            SageFrameRoute parentPage = (SageFrameRoute)this.Page;
            Categorykey = parentPage.Key;
            Categorykey = Categorykey.Replace("ampersand", "&").Replace("-", " ");
            if (!IsPostBack)
            {

                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }
                OverRideSEOInfo(Categorykey, StoreID, PortalID, UserName, CultureName);

                UserIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIP, out CountryName);

                StoreSettingConfig ssc = new StoreSettingConfig();
                NoImageCategoryDetailPath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
                AllowWishListCategory = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID, CultureName);
               
            }
            
            InitializeJS();
           
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("ItemLists", "/Templates/" + TemplateName + "/css/MessageBox/style.css");
                IncludeJs("ItemLists", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js");
                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                UserIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIP, out CountryName);

                CategoryID = Int32.Parse(Request.QueryString["cid"]);
                SearchText = Request.QueryString["q"];                
               
                StoreSettingConfig ssc = new StoreSettingConfig();
                NoImageItemListPath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
                AllowWishListItemList = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID, CultureName);

            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    public void LoadGlobalVariables()
    {
        Page.ClientScript.RegisterClientScriptInclude("AspxCommereCore", ResolveUrl("~/js/SageFrameCorejs/aspxcommercecormin.js"));
        IncludeJs("Session", "/js/Session.js");
        IncludeJs("Encoder", "/js/encoder.js");
        bool isIE = HttpContext.Current.Request.Browser.Type.ToUpper().Contains("IE");
        if (isIE)
        {
            IncludeJs("Base64", "/js/Base64/base64.js");
        }
        IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);       
        PageExtension = SageFrameSettingKeys.PageExtension;
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalServicePath", " var aspxservicePath='" + ResolveUrl("~/") + "Modules/AspxCommerce/AspxCommerceServices/" + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalRootPath", " var aspxRootPath='" + ResolveUrl("~/") + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalTemplateFolderPath", " var aspxTemplateFolderPath='" + ResolveUrl("~/") + "Templates/" + TemplateName + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "pageExtension", " var pageExtension='" + PageExtension + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "storeID", " var storeID='" + GetStoreID + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "portalID", " var portalID='" + GetPortalID + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "culturename", " var cultureName='" + GetCurrentCultureName + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "templatename", " var templateName='" + TemplateName + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "customerid", " var customerID='" + GetCustomerID + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "username", " var userName='******';", true);
                      ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "isfriendlyurl", " var IsUseFriendlyUrls='" + IsUseFriendlyUrls + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "sessioncode", " var sessionCode='" + HttpContext.Current.Session.SessionID.ToString() + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "clientIPAddress", " var clientIPAddress='" + HttpContext.Current.Request.UserHostAddress + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "LoginURL", " var LoginURL='" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage) + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "itemImagePath", " var itemImagePath='Modules/AspxCommerce/AspxItemsManagement/uploads/';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "categoryImagePath", " var categoryImagePath='Modules/AspxCommerce/AspxCategoryManagement/uploads/';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "section", " var section='" + 1 + "';", true);
        string userIP = HttpContext.Current.Request.UserHostAddress;
        string countryName = "";
        IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
        ipToCountry.GetCountry(userIP, out countryName);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "clientCountry", " var aspxCountryName='" + countryName + "';", true);
        StoreSettingConfig ssc = new StoreSettingConfig();
        string currencyCode = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, GetStoreID, GetPortalID, GetCurrentCultureName);
        if (currencyCode != null)
        {
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "region",
                                                    " var region='" +
                                                    StoreSetting.GetRegionFromCurrencyCode(currencyCode, GetStoreID,
                                                                                           GetPortalID) + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "curSymbol",
                                                    " var curSymbol='" +
                                                    StoreSetting.GetSymbolFromCurrencyCode(currencyCode, GetStoreID,
                                                                                           GetPortalID) + "';", true);
        }
        if (HttpContext.Current.Session["CurrencyRate"] == null)
        {
            HttpContext.Current.Session["CurrencyRate"] = 1;
        }
        if (HttpContext.Current.Session["CurrencyCode"] == null)
        {
            HttpContext.Current.Session["CurrencyCode"] = currencyCode;
        }
        if (IsUseFriendlyUrls)
        {
            if (!IsParent)
            {
                sageRedirectPath = ResolveUrl(GetParentURL + "/portal/" + GetPortalSEOName + "/");
                sageNavigateUrl = ResolveUrl(GetParentURL + "/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + PageExtension);
            }
            else
            {
                sageRedirectPath = ResolveUrl("~/");
                sageNavigateUrl = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + PageExtension);
            }
        }
        else
        {
            sageRedirectPath = ResolveUrl("{~/Default" + PageExtension + "?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=");
            sageNavigateUrl = ResolveUrl("~/Default" + PageExtension + "?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
        }
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalRedirectPath", " var aspxRedirectPath='" + sageRedirectPath + "';", true);

    }
Пример #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                storeID = GetStoreID;
                portalID = GetPortalID;
                customerID = GetCustomerID;
                userName = GetUsername;
                cultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    sessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                //StoreSettingInfo DefaultStoreSettings = (StoreSettingInfo)Session["DefaultStoreSettings"];
                //DefaultStoreSettings.AllowAnonymousCheckOut
                userIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(userIP, out countryName);
	            defaultImagePath=StoreSetting.GetStoreSettingValueByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
	            noOfLatestItems =Convert.ToInt32( StoreSetting.GetStoreSettingValueByKey(StoreSetting.NoOfLatestItemsDisplay, storeID, portalID, cultureName));
	            enableLatestItems = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableLatestItems, storeID, portalID, cultureName);
                allowOutStockPurchase = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);
                maxCompareItemCount = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.MaxNoOfItemsToCompare, storeID, portalID, cultureName));
                noOfLatestItemsInARow = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.NoOfLatestItemsInARow, storeID, portalID, cultureName));
                allowWishListLatestItem = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableWishList,storeID,portalID,cultureName);
                allowAddToCompareLatest = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableCompareItems, storeID, portalID, cultureName);
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            if (Membership.GetUser() != null)
            {
                IncludeCss("WishItemList", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css");
                IncludeJs("WishItemList", "/js/DateTime/date.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/js/PopUp/custom.js", "/js/FormValidation/jquery.validate.js");
                //SageFrameConfig pagebase = new SageFrameConfig();
                //IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
                StoreID = GetStoreID;
                PortalID = GetPortalID;
                UserName = GetUsername;
                CustomerID = GetCustomerID;
                CultureName = GetCurrentCultureName;
                if (!IsPostBack)
                {

                    MembershipUser userDetail = Membership.GetUser(GetUsername);
                    UserEmailWishList = userDetail.Email;
                }
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                UserIp = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIp, out CountryName);

                StoreSettingConfig ssc = new StoreSettingConfig();
                NoImageWishList = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                EnableWishList = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID, CultureName);
                ShowImageInWishlist = ssc.GetStoreSettingsByKey(StoreSetting.ShowItemImagesInWishList, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
            }
            else
            {
                if (IsUseFriendlyUrls)
                {
                    if (GetPortalID > 1)
                    {
                        Response.Redirect(ResolveUrl("~/portal/" + GetPortalSEOName + "/" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage)) + ".aspx?ReturnUrl=" + Request.Url.ToString(), false);
                    }
                    else
                    {
                        Response.Redirect(ResolveUrl("~/" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage)) + ".aspx?ReturnUrl=" + Request.Url.ToString(), false);
                    }
                }

                else
                {
                    Response.Redirect(ResolveUrl("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage)) + "?ReturnUrl=" + Request.Url.ToString(), false);
                }
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #21
0
    //public string costVariantData = string.Empty;   

    protected void page_init(object sender, EventArgs e)
    {
        // modulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
        ////This is for Download file Path  
        aspxfilePath = ResolveUrl("~") + "Modules/AspxCommerce/AspxItemsManagement/";

        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            SageFrameRoute parentPage = (SageFrameRoute)this.Page;

            itemSKU = parentPage.Key;//Request.QueryString["itemId"];
            //itemName = "item3"; //Request.QueryString["itemName"];

            if (!IsPostBack)
            {
                storeID = GetStoreID;
                portalID = GetPortalID;
                customerID = GetCustomerID;
                userName = GetUsername;
                cultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    sessionCode = HttpContext.Current.Session.SessionID.ToString();
                }
                OverRideSEOInfo(itemSKU, storeID, portalID, userName, cultureName);
                userIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(userIP, out countryName);

                if (Membership.GetUser() != null)
                {
                    MembershipUser userDetail = Membership.GetUser(GetUsername);
                    userEmail = userDetail.Email;
                }

                StoreSettingConfig ssc = new StoreSettingConfig();
                noItemDetailImagePath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
                enableEmailFriend = ssc.GetStoreSettingsByKey(StoreSetting.EnableEmailAFriend, storeID, portalID, cultureName);
                allowAnonymousReviewRate = ssc.GetStoreSettingsByKey(StoreSetting.AllowAnonymousUserToWriteItemRatingAndReviews, storeID, portalID, cultureName);
                minimumItemQuantity =int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.MinimumItemQuantity, storeID, portalID, cultureName));
                maximumItemQuantity =int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.MaximumItemQuantity, storeID, portalID, cultureName));
                allowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);
                maxCompareItemCount =int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.MaxNoOfItemsToCompare, storeID, portalID, cultureName));
                relatedItemsCount =int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfRelatedCartItems, storeID, portalID, cultureName));
                allowWishListItemDetail = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, storeID, portalID, cultureName);
                allowCompareItemDetail = ssc.GetStoreSettingsByKey(StoreSetting.EnableCompareItems, storeID, portalID, cultureName);
                allowMultipleReviewPerUser = bool.Parse(ssc.GetStoreSettingsByKey(StoreSetting.AllowMultipleReviewsPerUser, storeID, portalID, cultureName));
                allowMultipleReviewPerIP = bool.Parse(ssc.GetStoreSettingsByKey(StoreSetting.AllowMultipleReviewsPerIP, storeID, portalID, cultureName));
            }

            if (SageUserModuleID != "")
            {
                UserModuleID = int.Parse(SageUserModuleID);
            }
            else
            {
                UserModuleID = 0;
            }

            InitializeJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #22
0
    //public string costVariantData = string.Empty;   

    protected void page_init(object sender, EventArgs e)
    {
        // modulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
        ////This is for Download file Path  
        aspxfilePath = ResolveUrl("~") + "Modules/ASPXCommerce/ASPXItemsManagement/"; 

        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            SageFrameRoute parentPage = (SageFrameRoute)this.Page;

            itemSKU = parentPage.Key;//Request.QueryString["itemId"];
            //itemName = "item3"; //Request.QueryString["itemName"];

            if (!IsPostBack)
            {
               
                storeID = GetStoreID;
                portalID = GetPortalID;
                customerID = GetCustomerID;
                userName = GetUsername;
                cultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    sessionCode = HttpContext.Current.Session.SessionID.ToString();
                }
                OverRideSEOInfo(itemSKU, storeID, portalID, userName, cultureName);
                userIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(userIP, out countryName);

                if (Membership.GetUser() != null)
                {
                    MembershipUser userDetail = Membership.GetUser(GetUsername);
                    userEmail = userDetail.Email;
                }

				noItemDetailImagePath = StoreSetting.GetStoreSettingValueByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
				enableEmailFriend = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableEmailAFriend, storeID, portalID, cultureName);
            	allowAnonymousReviewRate = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowAnonymousUserToWriteItemRatingAndReviews, storeID, portalID, cultureName);
                minimumItemQuantity = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.MinimumItemQuantity, storeID, portalID, cultureName));
                maximumItemQuantity=Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.MaximumItemQuantity,storeID,portalID,cultureName));
                allowOutStockPurchase = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);
                maxCompareItemCount = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.MaxNoOfItemsToCompare, storeID, portalID, cultureName));
                relatedItemsCount = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.NoOfRelatedCartItems, storeID, portalID, cultureName));
                allowWishListItemDetail = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableWishList, storeID, portalID, cultureName);
                allowCompareItemDetail = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableCompareItems, storeID, portalID, cultureName);
            }
           
            if (SageUserModuleID != "")
            {
                UserModuleID = int.Parse(SageUserModuleID);
            }
            else
            {
                UserModuleID = 0;
            }

            InitializeJS();

            string strTemplatePath = "";
            ArrayList cssList = new ArrayList();
            cssList.Add("~/Templates/" + TemplateName + "/css/ImageGallery/styles.css");
            cssList.Add("~/Templates/" + TemplateName + "/css/ImageGallery/jquery.gzoom.css");
            cssList.Add("~/Templates/" + TemplateName + "/css/PopUp/style.css");
            cssList.Add("~/Templates/" + TemplateName + "/css/StarRating/jquery.rating.css");
            cssList.Add("~/Templates/" + TemplateName + "/css/JQueryUIFront/jquery.ui.all.css");
            cssList.Add("~/Templates/" + TemplateName + "/css/MessageBox/style.css");

            foreach (string css in cssList)
            {
                strTemplatePath = css;
                IncludeCssFile(strTemplatePath);
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #23
0
        public void SetGlobalVariables()
        {
            IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalServicePath", " var aspxservicePath='" + ResolveUrl("~/") + "Modules/AspxCommerce/AspxCommerceServices/" + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalRootPath", " var aspxRootPath='" + ResolveUrl("~/") + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalTemplateFolderPath", " var aspxTemplateFolderPath='" + ResolveUrl("~/") + "Templates/" + TemplateName + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "storeID", " var storeID='" + GetStoreID + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "portalID", " var portalID='" + GetPortalID + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "culturename", " var cultureName='" + GetCurrentCultureName + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "templatename", " var templateName='" + TemplateName + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "customerid", " var customerID='" + GetCustomerID + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "username", " var userName='******';", true);
            //  ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "noimagepath", " var aspxTemplateFolderPath='" + ResolveUrl("~/") + "Templates/" + TemplateName + "';", true);
            //  ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "defaultlogourl", " var aspxTemplateFolderPath='" + ResolveUrl("~/") + "Templates/" + TemplateName + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "isfriendlyurl", " var IsUseFriendlyUrls='" + IsUseFriendlyUrls + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "sessioncode", " var sessionCode='" + HttpContext.Current.Session.SessionID.ToString() + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "clientIPAddress", " var clientIPAddress='" + HttpContext.Current.Request.UserHostAddress + "';", true);
            string userIP = HttpContext.Current.Request.UserHostAddress;
            string countryName = "";
            IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
            ipToCountry.GetCountry(userIP, out countryName);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "clientCountry", " var aspxCountryName='" + countryName + "';", true);
            if (IsUseFriendlyUrls)
            {
                if (GetPortalID > 1)
                {
                    sageRedirectPath = ResolveUrl("~/portal/" + GetPortalSEOName + "/");
                    sageNavigateUrl = ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx");
                }
                else
                {
                    sageRedirectPath = ResolveUrl("~/");
                    sageNavigateUrl = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx");
                }
            }
            else
            {
                sageRedirectPath = ResolveUrl("{~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=");
                sageNavigateUrl = ResolveUrl("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
            }
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalRedirectPath", " var aspxRedirectPath='" + sageRedirectPath + "';", true);

        }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            

            GetPortalCommonInfo(out StoreID, out PortalID, out CustomerID, out UserName, out CultureName, out SessionCode);
            AspxCommonInfo aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName);
            if (!IsPostBack)
            {
                string templateName = TemplateName;
                IncludeCss("AdvanceSearch", "/Templates/"+ templateName+ "/css/MessageBox/style.css",
                           "/Templates/"+ templateName+ "/css/PopUp/style.css",
                           "/Templates/"+ templateName+ "/css/ToolTip/tooltip.css",
                           "/Templates/"+ templateName+ "/css/FancyDropDown/fancy.css",
                           "/Modules/AspxCommerce/AspxAdvanceSearch/css/AdvanceSearch.css");

                IncludeLanguageJS();
                IncludeJs("AdvanceSearch", "/js/Templating/tmpl.js", "/js/encoder.js", "/js/Paging/jquery.pagination.js",
                    "/js/Templating/AspxTemplate.js", "/js/PopUp/custom.js",
                          "/js/jquery.tipsy.js", "/js/FancyDropDown/itemFancyDropdown.js",
                          "/js/SageFrameCorejs/itemTemplateView.js",
                          "/Modules/AspxCommerce/AspxAdvanceSearch/js/AdvanceSearch.js",
                          "/Modules/AspxCommerce/AspxAdvanceSearch/APIjs/AdvanceSearchAPI.js");

                AdvanceSearchModulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
                UserIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIP, out CountryName);
                string sortByOptionsDefault = string.Empty;
                string viewAsOptionsDefault = string.Empty;
                GetAdvanceSearchSetting(aspxCommonObj,0, false);
                StoreSettingConfig ssc = new StoreSettingConfig();
                ssc.GetStoreSettingParamEight(StoreSetting.DefaultProductImageURL,
                                            StoreSetting.ShowAddToCartButton,
                                            StoreSetting.AllowOutStockPurchase,
                                            StoreSetting.ItemDisplayMode,
                                            StoreSetting.SortByOptionsDefault,
                                            StoreSetting.ViewAsOptions,
                                            StoreSetting.ViewAsOptionsDefault,
                                            StoreSetting.SortByOptions,
                                            out NoImageAdSearchPath,
                                            out AllowAddToCart,
                                            out AllowOutStockPurchase,
                                            out ItemDisplayMode,
                                            out sortByOptionsDefault,
                                            out ViewAsOptions,
                                            out viewAsOptionsDefault,
                                            out SortByOptions,
                                            StoreID,
                                            PortalID,
                                            CultureName
                                            );

                SortByOptionsDefault = Int32.Parse(sortByOptionsDefault);
                ViewAsOptionsDefault = Int32.Parse(viewAsOptionsDefault);
                NoOfItemsInARow = adSettingInfo.NoOfItemsInARow;

            }

            string modulePath = this.AppRelativeTemplateSourceDirectory;
            hst = AppLocalized.getLocale(modulePath);
            
            trBrand.Visible = true;
            
            CreateSortViewOption();

            GetAspxTemplates();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    private void CreateGlobalVariables(AspxCommonInfo aspxCommonObj,bool isKPIInstalled,bool isABTestInstalled)
    {
        
        Page.ClientScript.RegisterClientScriptInclude("AspxCommereCore",
            ResolveUrl("~/js/SageFrameCorejs/aspxcommercecormin.js"));
        if (isABTestInstalled)
        {
            IncludeJs("AspxABTesting", "/Modules/AspxCommerce/AspxABTesting/js/ABTest.js", 
                "/Modules/AspxCommerce/AspxABTesting/Language/AspxABTesting.js");
        }
        if (isKPIInstalled)
        {
            IncludeJs("AspxKPI", "/Modules/AspxCommerce/AspxKPI/js/KPICommon.js", 
                "/Modules/AspxCommerce/AspxKPI/Language/AspxKPILanguage.js");
        }
        IncludeJs("StartUpJs", "/js/CurrencyFormat/jquery.currencies.js", "/js/jquery.masonry.js", 
            "/js/Templating/tmpl.js");

        IncludeCss("ui", "/js/jquery-ui-1.8.14.custom/css/redmond/jquery-ui-1.8.16.custom.css");
        PageExtension = SageFrameSettingKeys.PageExtension;

        string userIP = HttpContext.Current.Request.UserHostAddress;
        string countryName = "";
        IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
        ipToCountry.GetCountry(userIP, out countryName);
        StoreSettingConfig ssc = new StoreSettingConfig();
        string myCartURL, currencyCode, sortByOptions, 
            sortByOptionsDefault, viewAsOptions, viewAsOptionsDefault;

        ssc.GetStoreSettingParamSeven(StoreSetting.ShoppingCartURL, StoreSetting.MainCurrency, StoreSetting.SendEcommerceEmailsFrom, 
            StoreSetting.SortByOptions, StoreSetting.SortByOptionsDefault,
            StoreSetting.ViewAsOptions, StoreSetting.ViewAsOptionsDefault, 
            out myCartURL, out currencyCode, out SendEcommerceEmailsFrom, 
            out sortByOptions, out sortByOptionsDefault,
          out viewAsOptions, out viewAsOptionsDefault, aspxCommonObj.StoreID,
          aspxCommonObj.PortalID, aspxCommonObj.CultureName);

        Session["SendEcommerceEmailsFrom"] = SendEcommerceEmailsFrom;
        
        string resolveUrl = ResolveUrl("~/");
        if (!IsParent)
        {
            sageRedirectPath = ResolveUrl(GetParentURL + "/portal/" + GetPortalSEOName + "/");
            sageNavigateUrl = ResolveUrl(GetParentURL + "/portal/" + GetPortalSEOName + "/" + PortalAPI.DefaultPageURL + PageExtension);
        }
        else
        {
            sageRedirectPath = resolveUrl;
            sageNavigateUrl = ResolveUrl("~/" + PortalAPI.DefaultPageURL + PageExtension);
        }


        StringBuilder strGlobalVar = new StringBuilder();
        
        strGlobalVar.Append("var aspxservicePath='");
        strGlobalVar.Append(resolveUrl);
        strGlobalVar.Append("Modules/AspxCommerce/AspxCommerceServices/");
        strGlobalVar.Append("';");
        strGlobalVar.Append("var aspxRootPath='");
        strGlobalVar.Append(resolveUrl);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var aspxTemplateFolderPath='");
        strGlobalVar.Append(resolveUrl);
        strGlobalVar.Append("Templates/");
        strGlobalVar.Append(TemplateName);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var pageExtension='");
        strGlobalVar.Append(PageExtension);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var templateName='");
        strGlobalVar.Append(TemplateName);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var customerID='");
        strGlobalVar.Append(aspxCommonObj.CustomerID);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var IsUseFriendlyUrls='");
        strGlobalVar.Append(true);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var sessionCode='");
        strGlobalVar.Append(aspxCommonObj.SessionCode);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var clientIPAddress='");
        strGlobalVar.Append(HttpContext.Current.Request.UserHostAddress);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var sortByOptions='");
        strGlobalVar.Append(sortByOptions);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var sortByOptionsDefault='");
        strGlobalVar.Append(sortByOptionsDefault);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var viewAsOptions='");
        strGlobalVar.Append(viewAsOptions);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var viewAsOptionsDefault='");
        strGlobalVar.Append(viewAsOptionsDefault);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var BaseCurrency='");
        strGlobalVar.Append(currencyCode);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var myCartURL='");
        strGlobalVar.Append(myCartURL);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var homeURL='");
        strGlobalVar.Append(sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
        strGlobalVar.Append("';");
        strGlobalVar.Append("var LogInURL='");
        strGlobalVar.Append(LoginPage);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var itemImagePath='Modules/AspxCommerce/AspxItemsManagement/uploads/';");
        strGlobalVar.Append("var categoryImagePath='Modules/AspxCommerce/AspxCategoryManagement/uploads/';");
        strGlobalVar.Append("var section='");
        strGlobalVar.Append(0);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var aspxRedirectPath='");
        strGlobalVar.Append(sageRedirectPath);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var IsKPIInstalled='");
        strGlobalVar.Append(isKPIInstalled);
        strGlobalVar.Append("';");
        strGlobalVar.Append("var IsABTestInstalled='");
        strGlobalVar.Append(isABTestInstalled);
        strGlobalVar.Append("';");
        strGlobalVar.Append(" var aspxCountryName='");
        strGlobalVar.Append(countryName);
        strGlobalVar.Append("';");
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), 
            "aspxGlobalVariables", strGlobalVar.ToString(), true);
    }
Пример #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            storeID = GetStoreID;
            portalID = GetPortalID;
            userName = GetUsername;
            customerID = GetCustomerID;
            cultureName = GetCurrentCultureName;
            if (HttpContext.Current.Session.SessionID != null)
            {
                sessionCode = HttpContext.Current.Session.SessionID.ToString();
            }

            userIP = HttpContext.Current.Request.UserHostAddress;
            IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
            ipToCountry.GetCountry(userIP, out countryName);
            noImageWishList = StoreSetting.GetStoreSettingValueByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
            enableWishList = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableWishList, storeID, portalID, cultureName);
            showImageInWishlist = StoreSetting.GetStoreSettingValueByKey(StoreSetting.ShowItemImagesInWishList, storeID, portalID, cultureName);
            allowOutStockPurchase = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            if (!IsPostBack)
            {
                storeID = GetStoreID;
                portalID = GetPortalID;
                customerID = GetCustomerID;
                userName = GetUsername;
                cultureName = GetCurrentCultureName;

                UserInfo sageUser = m.GetUserDetails(GetPortalID, GetUsername);
                userEmail = sageUser.Email;
                userFirstName = sageUser.FirstName;
                userLastName = sageUser.LastName;

                if (HttpContext.Current.Session.SessionID != null)
                {
                    sessionCode = HttpContext.Current.Session.SessionID.ToString();
                }
                allowMultipleAddress = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowUsersToCreateMultipleAddress, storeID, portalID, cultureName);
                allowWishListMyAccount = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableWishList, storeID, portalID, cultureName);
                userIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(userIP, out countryName);


            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            if (Membership.GetUser() != null)
            {
                if (!IsPostBack)
                {
                    IncludeCss("UserDashBoard", "/Templates/" + TemplateName + "/css/GridView/tablesort.css", "/Templates/" + TemplateName + "/css/StarRating/jquery.rating.css", "/Templates/" + TemplateName + "/css/MessageBox/style.css",
                                "/Templates/" + TemplateName + "/css/PopUp/style.css", "/Templates/" + TemplateName + "/css/JQueryUIFront/jquery.ui.all.css", "/Templates/" + TemplateName + "/css/PasswordValidation/jquery.validate.password.css");

                    IncludeJs("UserDashBoard", "/js/JQueryUI/jquery-ui-1.8.10.custom.js", "/js/jDownload/jquery.jdownload.js", "/js/DateTime/date.js", "/js/MessageBox/jquery.easing.1.3.js",
                        "/js/MessageBox/alertbox.js", "/js/StarRating/jquery.MetaData.js", "/js/FormValidation/jquery.validate.js", "/js/PasswordValidation/jquery.validate.password.js",
                        "/js/GridView/jquery.grid.js", "/js/GridView/SagePaging.js", "/js/GridView/jquery.global.js", "/js/GridView/jquery.dateFormat.js",
                        "/js/StarRating/jquery.rating.js", "/js/PopUp/custom.js");

                    storeID = GetStoreID;
                    portalID = GetPortalID;
                    customerID = GetCustomerID;
                    userName = GetUsername;
                    cultureName = GetCurrentCultureName;
                    UserInfo sageUser = m.GetUserDetails(GetPortalID, GetUsername);
                    if (HttpContext.Current.Session.SessionID != null)
                    {
                        sessionCode = HttpContext.Current.Session.SessionID.ToString();
                    }
                    if (sageUser.UserName != null)
                    {
                        userEmail = sageUser.Email;
                        userFirstName = sageUser.FirstName;
                        userLastName = sageUser.LastName;
                        MembershipUser userDetail = Membership.GetUser(GetUsername);//added later for wishlist
                        userEmailWishList = userDetail.Email;//added later for wishlist
                        userIP = HttpContext.Current.Request.UserHostAddress;
                        IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                        ipToCountry.GetCountry(userIP, out countryName);
                    }

                    //else
                    //{
                    //    if (GetPortalID > 1)
                    //    {
                    //        Response.Redirect( "~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage) + ".aspx") ;

                    //    }
                    //    else
                    //    {
                    //        Response.Redirect( "~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage) + ".aspx");
                    //    }
                    //}

                    StoreSettingConfig ssc = new StoreSettingConfig();
                    allowMultipleAddress = ssc.GetStoreSettingsByKey(StoreSetting.AllowUsersToCreateMultipleAddress, storeID, portalID, cultureName);
                    allowWishListMyAccount = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, storeID, portalID, cultureName);
                    //added for wishlist in dashboard along with required variables and js form WishItemList module
                    //noImageWishList = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
                    //enableWishList = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, storeID, portalID, cultureName);
                    //showImageInWishlist = ssc.GetStoreSettingsByKey(StoreSetting.ShowItemImagesInWishList, storeID, portalID, cultureName);
                    //allowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);





                }
            }
            else
            {
                if (IsUseFriendlyUrls)
                {
                    if (GetPortalID > 1)
                    {
                        Response.Redirect(ResolveUrl("~/portal/" + GetPortalSEOName + "/" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage)) + ".aspx?ReturnUrl=" +Request.Url.ToString(),false);
                    }
                    else
                    {
                        Response.Redirect(ResolveUrl("~/" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage)) + ".aspx?ReturnUrl=" + Request.Url.ToString(),false);
                    }
                }

                else
                {
                    Response.Redirect(ResolveUrl("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage)) + "?ReturnUrl=" + Request.Url.ToString(),false);
                }
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {

            SageFrameConfig pagebase = new SageFrameConfig();
            string PortalLoginpage = pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage);//Ask santosh to get portal login page
            SecurityPolicy objSecurity = new SecurityPolicy();
            FormsAuthenticationTicket ticket = objSecurity.GetUserTicket(GetPortalID);

            AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
            base.GetPortalCommonInfo(out storeID, out portalID, out customerID, out userName, out cultureName, out sessionCode);
            aspxCommonObj = new AspxCommonInfo(storeID, portalID, userName, cultureName, customerID, sessionCode);

            RewardPointsGeneralSettingsIsActive = RewardPointsController.RewardPointsGeneralSettingsIsActive(aspxCommonObj).ToString();

            StoreSettingConfig ssc = new StoreSettingConfig();
            ssc.GetStoreSettingParamThree(StoreSetting.AllowUsersToCreateMultipleAddress,
                                        StoreSetting.MainCurrency,
                                        StoreSetting.ShowAddToCartButton,
                                        out allowMultipleAddress,
                                        out CurrencyCodeSlected,
                                        out AllowAddToCart,
                                        storeID,
                                        portalID,
                                        cultureName
                                        );

            IsRewardInstl = AspxCommonController.GetModuleInstallationInfo("AspxRewardPoints", aspxCommonObj).ToString();

            if (ticket != null && ticket.Name != ApplicationKeys.anonymousUser)
            {
                if (!IsPostBack)
                {
                    string templateName = TemplateName;

                    IncludeCss("UserDashBoardCSS", "/Templates/" + templateName + "/css/GridView/tablesort.css", "/Templates/" + templateName + "/css/StarRating/jquery.rating.css", "/Templates/" + templateName + "/css/MessageBox/style.css",
                                "/Templates/" + templateName + "/css/PopUp/style.css", "/Templates/" + templateName + "/css/JQueryUIFront/jquery.ui.all.css", "/Templates/" + templateName + "/css/PasswordValidation/jquery.validate.password.css", "/Templates/" + templateName + "/css/ToolTip/tooltip.css");
                    IncludeJs("UserDashBoardJS", "/Modules/AspxCommerce/AspxWishList/js/WishItemList.js", "/js/jDownload/jquery.jdownload.js", "/js/DateTime/date.js", "/js/MessageBox/jquery.easing.1.3.js",
                        "/js/MessageBox/alertbox.js", "/js/StarRating/jquery.MetaData.js", "/js/FormValidation/jquery.validate.js", "/js/PasswordValidation/jquery.validate.password.js",
                        "/js/GridView/jquery.grid.js", "/js/GridView/SagePaging.js", "/js/GridView/jquery.global.js", "/js/GridView/jquery.dateFormat.js", "/js/GridView/jquery.tablesorter.min.js", "/js/StarRating/jquery.rating.pack.js", "/js/encoder.js",
                        "/js/StarRating/jquery.rating.js", "/js/PopUp/custom.js", "/js/jquery.tipsy.js", "/Modules/AspxCommerce/AspxUserDashBoard/js/userdashboard.js", "/js/Paging/jquery.pagination.js", "/js/FormValidation/jquery.form-validation-and-hints.js");
                
                    userModuleIDUD = int.Parse(SageUserModuleID);
                    ModulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);

                    MembershipController m = new MembershipController();
                    UserInfo sageUser = m.GetUserDetails(GetPortalID, GetUsername);

                    AspxCommonController objUser = new AspxCommonController();
                    UsersInfo userDetails = objUser.GetUserDetails(aspxCommonObj);

                    if (userDetails.UserName != null)
                    {
                        userEmail = userDetails.Email;
                        userFirstName = userDetails.FirstName;
                        userLastName = userDetails.LastName;
                        userPicture = userDetails.ProfilePicture;
                        userEmailWishList = userEmail;//userDetail.Email;//added later for wishlist
                        userIP = HttpContext.Current.Request.UserHostAddress;
                        IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                        ipToCountry.GetCountry(userIP, out countryName);
                    }


                    BindUserDetails();
                }
                IncludeAllLanguageJS();
            }
            else
            {
                if (!IsParent)
                {
                    Response.Redirect(ResolveUrl(GetParentURL + "/portal/" + GetPortalSEOName + "/" + PortalLoginpage) + ".aspx?ReturnUrl=" + Request.Url.ToString(), false);
                }
                else
                {
                    Response.Redirect(ResolveUrl("~/" + PortalLoginpage) + ".aspx?ReturnUrl=" + Request.Url.ToString(), false);
                }
            }
            IncludeAllLanguageJS();

            GetUserRecentActivity(aspxCommonObj);
            GetAddressBookDetails(aspxCommonObj);
            GetAllCountry();

            GetMyOrders(aspxCommonObj);

        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SageFrameRoute parentPage = (SageFrameRoute)this.Page;
        itemSKU = parentPage.Key;
        userIP = HttpContext.Current.Request.UserHostAddress;

        string templateName = TemplateName;
        aspxfilePath = ResolveUrl("~") + "Modules/AspxCommerce/AspxItemsManagement/";

        GetPortalCommonInfo(out storeID, out portalID, out customerID, out userName, out cultureName, out sessionCode);
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo(storeID, portalID, userName, cultureName, customerID, sessionCode);

        variantQuery = Request.QueryString["varId"];
        IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();

        ipToCountry.GetCountry(userIP, out countryName);
        if (countryName == null)
            countryName = string.Empty;

        SecurityPolicy objSecurity = new SecurityPolicy();
        FormsAuthenticationTicket ticket = objSecurity.GetUserTicket(GetPortalID);
        if (ticket != null && ticket.Name != ApplicationKeys.anonymousUser)
        {
            MembershipController member = new MembershipController();
            UserInfo userDetail = member.GetUserDetails(GetPortalID, GetUsername);
            userEmail = userDetail.Email;
        }
        string AllowMultipleReviewPerUser, AllowMultipleReviewPerIP = string.Empty;

        StoreSettingConfig ssc = new StoreSettingConfig();
        ssc.GetStoreSettingParamEight(StoreSetting.AllowRealTimeNotifications, StoreSetting.DefaultProductImageURL, StoreSetting.EnableEmailAFriend,
           StoreSetting.AllowAnonymousUserToWriteItemRatingAndReviews, StoreSetting.AllowOutStockPurchase, StoreSetting.ShowAddToCartButton,
           StoreSetting.AllowMultipleReviewsPerUser, StoreSetting.AllowMultipleReviewsPerIP, out AllowRealTimeNotifications,
           out noItemDetailImagePath, out enableEmailFriend, out allowAnonymousReviewRate, out allowOutStockPurchase, out AllowAddToCart,
           out AllowMultipleReviewPerUser, out AllowMultipleReviewPerIP, storeID, portalID, cultureName);

        allowMultipleReviewPerUser = Boolean.Parse(AllowMultipleReviewPerUser);
        allowMultipleReviewPerIP = Boolean.Parse(AllowMultipleReviewPerIP);

        ItemPagePath = ResolveUrl("~/Item/");



        if (!IsPostBack)
        {
            IncludeCss("ItemDetails",
                       "/Templates/" + templateName + "/css/PopUp/style.css",
                       "/Templates/" + templateName + "/css/StarRating/jquery.rating.css",
                       "/Templates/" + templateName + "/css/JQueryUIFront/jquery-ui.all.css",
                       "/Templates/" + templateName + "/css/MessageBox/style.css",
                       "/Templates/" + templateName + "/css/FancyDropDown/fancy.css",
                       "/Templates/" + templateName + "/css/ToolTip/tooltip.css",
                       "/Templates/" + templateName + "/css/PopUp/popbox.css",
                       "/Modules/AspxCommerce/AspxItemDetails/css/module.css"
                       );
            IncludeJs("ItemDetails",
                      "/js/jDownload/jquery.jdownload.js", "/js/MessageBox/alertbox.js", "/js/DateTime/date.js",
                      "/js/PopUp/custom.js", "/js/FormValidation/jquery.validate.js",
                      "/js/StarRating/jquery.rating.js",
                       "/Modules/AspxCommerce/AspxItemDetails/js/jquery.currencydropdown.js",
                      "/js/PopUp/popbox.js",
                      "/js/FancyDropDown/itemFancyDropdown.js",
                      "/js/jquery.labelify.js", "/js/encoder.js", "/js/StarRating/jquery.rating.pack.js",
                      "/js/StarRating/jquery.MetaData.js", "/js/Paging/jquery.pagination.js",
                       "/Modules/AspxCommerce/AspxItemDetails/js/ItemDetails.js");
        }
        IncludeLanguageJS();
        GetItemDetailsInfo(aspxCommonObj, itemSKU, userIP, countryName);

    }