Exemple #1
0
 protected void page_init(object sender, EventArgs e)
 {
     try
     {
         SageFrameRoute parentPage = (SageFrameRoute)this.Page;
         Categorykey = parentPage.Key;
         Categorykey = AspxUtility.fixedDecodeURIComponent(Categorykey);
         StoreID     = GetStoreID;
         PortalID    = GetPortalID;
         CustomerID  = GetCustomerID;
         UserName    = GetUsername;
         CultureName = GetCurrentCultureName;
         if (HttpContext.Current.Session.SessionID != null)
         {
             SessionCode = HttpContext.Current.Session.SessionID.ToString();
         }
         if (!IsPostBack)
         {
             UserIp = HttpContext.Current.Request.UserHostAddress;
             IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
             ipToCountry.GetCountry(UserIp, out CountryName);
             OverRideSEOInfo(Categorykey, StoreID, PortalID, UserName, CultureName);
             StoreSettingConfig ssc = new StoreSettingConfig();
             NoImageCategoryDetailPath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
             AllowAddToCart            = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, StoreID, PortalID, CultureName);
             AllowOutStockPurchase     = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
             NoOfItemsInARow           = 3;//int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfDisplayItems, StoreID, PortalID, CultureName));
             ItemDisplayMode           = ssc.GetStoreSettingsByKey(StoreSetting.ItemDisplayMode, 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);
        }
    }
    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);
        }
    }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                //IncludeCss("ProductListSetting", "/Templates/" + TemplateName + "/css/MessageBox/style.css");
                IncludeJs("ProductListSetting", "/Modules/AspxCommerce/AspxProductLister/js/ProductListsSetting.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);
            }
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Exemple #5
0
    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);
            }
            IncludeLanguageJS();
        }
        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>";
    }
Exemple #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                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");
                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/js/AdvanceSearchAPI.js");
                StoreID     = GetStoreID;
                PortalID    = GetPortalID;
                CustomerID  = GetCustomerID;
                UserName    = GetUsername;
                CultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

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

                GetAdvanceSearchSetting();
                StoreSettingConfig ssc = new StoreSettingConfig();
                NoImageAdSearchPath   = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowAddToCart        = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
                NoOfItemsInARow       = adSettingInfo.NoOfItemsInARow;
                ItemDisplayMode       = ssc.GetStoreSettingsByKey(StoreSetting.ItemDisplayMode, StoreID, PortalID, CultureName);
                IncludeLanguageJS();
            }
            LoadAllCategoryForSearch();
            if (adSettingInfo.IsEnableBrandSearch)
            {
                trBrand.Visible = true;
                GetAllBrandForItem(0, false);
            }
            GetAspxTemplates();
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Exemple #8
0
 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/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();
         DefaultImagePath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID,
                                                      CultureName);
         NoOfGiftCardsAll =
             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));
         NoOfItemsInARow         = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfDisplayItems, StoreID, PortalID, CultureName));
         AllowWishListLatestItem = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID,
                                                             CultureName);
         AllowAddToCompareLatest = ssc.GetStoreSettingsByKey(StoreSetting.EnableCompareItems, StoreID, PortalID,
                                                             CultureName);
         GetAllGiftCards();
         IncludeLanguageJS();
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Exemple #9
0
        public void CreateGlobalVariables()
        {
            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(), "templateName", " var templateName='" + TemplateName + "';", 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);
            StoreSettingConfig ssc       = new StoreSettingConfig();
            string             myCartURL = ssc.GetStoreSettingsByKey(StoreSetting.ShoppingCartURL, GetStoreID, GetPortalID, GetCurrentCultureName);

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "myCartURL", " var myCartURL='" + myCartURL + "';", true);
            string userFullName = GetFullName(GetPortalID, GetUsername);

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "userFullName", " var userFullName='" + userFullName + "';", 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=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
                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_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);
     }
 }
Exemple #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("LatestItems", "/Templates/" + TemplateName + "/css/MessageBox/style.css",
                           "/Templates/" + TemplateName + "/css/Slider/style.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/jquery.ItembxSlider.js",
                          "/Modules/AspxCommerce/AspxLatestItems/js/LatestItemsCarousel.js",
                          "/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();
                }
                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);
                NoOfLatestItemsInARow =
                    int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfLatestItemsInARow, StoreID, PortalID,
                                                        CultureName));
            }
            IncludeLanguageJS();
            BindLatestItemCarousel();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Exemple #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            StoreID     = GetStoreID;
            PortalID    = GetPortalID;
            CustomerID  = GetCustomerID;
            UserName    = GetUsername;
            CultureName = GetCurrentCultureName;
            if (!IsPostBack)
            {
                IncludeCss("categoryWiseItemList", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/ToolTip/tooltip.css");
                IncludeJs("categoryWiseItemList", "/js/jquery.tipsy.js", "/js/encoder.js");
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                //StoreSettingInfo DefaultStoreSettings = (StoreSettingInfo)Session["DefaultStoreSettings"];
                //DefaultStoreSettings.AllowAnonymousCheckOut
                modulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
                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);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID,
                                                                  CultureName);
                MaxCompareItemCount =
                    int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.MaxNoOfItemsToCompare, StoreID, PortalID,
                                                        CultureName));
                NoOfItemsDisplayInARow =
                    int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfDisplayItems, StoreID, PortalID,
                                                        CultureName));
                AllowWishListLatestItem = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID,
                                                                    CultureName);
                AllowAddToCompareLatest = ssc.GetStoreSettingsByKey(StoreSetting.EnableCompareItems, StoreID, PortalID,
                                                                    CultureName);
            }
            IncludeLanguageJS();
            GetCategoryWiseItemSetting();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Exemple #13
0
    protected void page_init(object sender, EventArgs e)
    {
        try
        {
            ServicePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory + "/Service/Service.asmx/");

            UserIP = HttpContext.Current.Request.UserHostAddress;
            IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
            ipToCountry.GetCountry(UserIP, out CountryName);
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Exemple #14
0
 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);
     }
 }
Exemple #15
0
    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);
        }
    }
Exemple #16
0
    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);
        }
    }
Exemple #17
0
    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);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("ViewTagItems", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/ToolTip/tooltip.css", "/Templates/" + TemplateName + "/css/FancyDropDown/fancy.css");
                IncludeJs("ViewTagItems", "/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);

                SageFrameRoute parentPage = (SageFrameRoute)this.Page;

                TagsIDs = Request.QueryString["tagsId"];

                StoreSettingConfig ssc = new StoreSettingConfig();
                NoImageTagItemsPath        = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowOutStockPurchase      = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
                AllowWishListViewTagsItems = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID, CultureName);
                NoOfItemsInARow            = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfDisplayItems, StoreID, PortalID, CultureName));
                ItemDisplayMode            = ssc.GetStoreSettingsByKey(StoreSetting.ItemDisplayMode, StoreID, PortalID, CultureName);
                IncludeLanguageJS();
                GetAspxTemplates();
            }
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Exemple #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                ServicePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);

                IncludeJs("ItemsCompare", "/js/jquery.cookie.js",
                          "/Modules/AspxCommerce/AspxCompareItems/js/ItemsCompare.js");
                IncludeCss("ItemsCompare", "/Modules/AspxCommerce/AspxCompareItems/css/module.css");
                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);

                GetCompareItemsSettig();

                StoreSettingConfig ssc = new StoreSettingConfig();
                DefaultImagePath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
            }
            IncludeLanguageJS();
            if (EnableCompareItems)
            {
                BindCompareItems();
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Exemple #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                // IncludeCss("ProductList", "/Templates/" + TemplateName + "/css/MessageBox/style.css");
                IncludeJs("ProductList", "/Modules/AspxCommerce/AspxProductLister/js/ProductLists.js");

                StoreID     = GetStoreID;
                PortalID    = GetPortalID;
                CustomerID  = GetCustomerID;
                UserName    = GetUsername;
                CultureName = GetCurrentCultureName;
                basePath    = ResolveUrl("~/");
                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();
                ModuleCollapsible     = ssc.GetStoreSettingsByKey(StoreSetting.ModuleCollapsible, StoreID, PortalID, CultureName);
                CategoriesWiseItemUrl = ssc.GetStoreSettingsByKey(StoreSetting.CatWiseItemURL, StoreID, PortalID, CultureName);
            }
            IncludeLanguageJS();
            InitializeJS();
            GetProductListSetting();
            GetProductList();
        }

        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);
        }
    }
    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);
        }
    }
Exemple #23
0
    private void CreateGlobalVariables()
    {
        Page.ClientScript.RegisterClientScriptInclude("AspxCommereCore", ResolveUrl("~/js/SageFrameCorejs/aspxcommercecore.js"));
        Page.ClientScript.RegisterClientScriptInclude("AspxCommereTemplateJs", ResolveUrl("~/js/Templating/tmpl.js"));
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.PortalID = GetPortalID;
        bool isModuleInstalled = AspxCommonController.GetModuleInstallationInfo("AspxABTesting", aspxCommonObj);

        if (isModuleInstalled)
        {
            IncludeJs("AspxABTesting", "/Modules/AspxCommerce/AspxABTesting/js/ABTest.js");
            IncludeJs("AspxABTesting", "/Modules/AspxCommerce/AspxABTesting/Language/AspxABTesting.js");
        }

        bool isKPIMoudleInstalled = AspxCommonController.GetModuleInstallationInfo("AspxKPI", aspxCommonObj);

        if (isKPIMoudleInstalled)
        {
            IncludeJs("AspxKPI", "/Modules/AspxCommerce/AspxKPI/js/KPICommon.js");
            IncludeJs("AspxKPI", "/Modules/AspxCommerce/AspxKPI/Language/AspxKPILanguage.js");
        }
        IncludeJs("Session", "/js/Session.js");
        IncludeJs("CurrencyConvert", "/js/CurrencyFormat/jquery.currencies.js");
        IncludeJs("Masonry", "/js/jquery.masonry.js");
        IncludeCss("ui", "/js/jquery-ui-1.8.14.custom/css/redmond/jquery-ui-1.8.16.custom.css");
        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(), "templateName", " var templateName='" + 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);
        StoreSettingConfig ssc          = new StoreSettingConfig();
        string             myCartURL    = ssc.GetStoreSettingsByKey(StoreSetting.ShoppingCartURL, GetStoreID, GetPortalID, GetCurrentCultureName);
        string             currencyCode = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, GetStoreID, GetPortalID, GetCurrentCultureName);

        SendEcommerceEmailsFrom = ssc.GetStoreSettingsByKey(StoreSetting.SendEcommerceEmailsFrom, GetStoreID, GetPortalID, GetCurrentCultureName);
        string sortByOptions        = ssc.GetStoreSettingsByKey(StoreSetting.SortByOptions, GetStoreID, GetPortalID, GetCurrentCultureName);
        string sortByOptionsDefault = ssc.GetStoreSettingsByKey(StoreSetting.SortByOptionsDefault, GetStoreID, GetPortalID, GetCurrentCultureName);
        string viewAsOptions        = ssc.GetStoreSettingsByKey(StoreSetting.ViewAsOptions, GetStoreID, GetPortalID, GetCurrentCultureName);
        string viewAsOptionsDefault = ssc.GetStoreSettingsByKey(StoreSetting.ViewAsOptionsDefault, GetStoreID, GetPortalID, GetCurrentCultureName);

        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "sortByOptions", " var sortByOptions='" + sortByOptions + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "sortByOptionsDefault", " var sortByOptionsDefault='" + sortByOptionsDefault + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "viewAsOptions", " var viewAsOptions='" + viewAsOptions + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "viewAsOptionsDefault", " var viewAsOptionsDefault='" + viewAsOptionsDefault + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "BaseCurrency", " var BaseCurrency='" + currencyCode + "';", true);
        Session["SendEcommerceEmailsFrom"] = SendEcommerceEmailsFrom;
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "myCartURL", " var myCartURL='" + myCartURL + "';", true);
        string userFullName = ctl.GetFullName(GetPortalID, GetUsername);

        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "userFullName", " var userFullName='" + userFullName + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "homeURL", " var homeURL='" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + "';", 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='" + 0 + "';", true);
        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=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
            sageNavigateUrl  = ResolveUrl("~/Default" + PageExtension + "?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
        }
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalRedirectPath", " var aspxRedirectPath='" + sageRedirectPath + "';", true);
    }
Exemple #24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             StoreID           = GetStoreID;
             PortalID          = GetPortalID;
             CustomerID        = GetCustomerID;
             UserName          = GetUsername;
             CultureName       = GetCurrentCultureName;
             ModuleServicePath = ResolveUrl(AppRelativeTemplateSourceDirectory);
             if (HttpContext.Current.Session.SessionID != null)
             {
                 SessionCode = HttpContext.Current.Session.SessionID;
             }
             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);
             aspxCommonObj.StoreID     = StoreID;
             aspxCommonObj.PortalID    = PortalID;
             aspxCommonObj.UserName    = UserName;
             aspxCommonObj.CultureName = CultureName;
             modulePath                     = this.AppRelativeTemplateSourceDirectory;
             aspxTemplateFolderPath         = ResolveUrl("~/") + "Templates/" + TemplateName;
             aspxRootPath                   = ResolveUrl("~/");
             pageExtension                  = SageFrameSettingKeys.PageExtension;
             AllowOutStockPurchase          = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
             AllowWishListHeavyDIscountItem = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID, CultureName);
             AllowAddToCompareHeavyDiscount = ssc.GetStoreSettingsByKey(StoreSetting.EnableCompareItems, StoreID, PortalID, CultureName);
             MaxCompareItemCount            = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.MaxNoOfItemsToCompare, StoreID, PortalID, CultureName));
             HeavyDiscountItemRss           = ssc.GetStoreSettingsByKey(StoreSetting.HeavyDiscountItemRss, StoreID, PortalID, CultureName);
             if (HeavyDiscountItemRss.ToLower() == "true")
             {
                 RssFeedUrl = ssc.GetStoreSettingsByKey(StoreSetting.RssFeedURL, StoreID, PortalID, CultureName);
             }
             decimal additionalCCVR = decimal.Parse(ssc.GetStoreSettingsByKey(StoreSetting.AdditionalCVR, StoreID, PortalID, CultureName));
             string  MainCurrency   = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, StoreID, PortalID, CultureName);
             if (HttpContext.Current.Session["CurrencyRate"] != null)
             {
                 if (Session["CurrencyCode"].ToString() != MainCurrency)
                 {
                     decimal rate1 = decimal.Parse(Session["CurrencyRate"].ToString());
                     Rate = Math.Round(rate1 + (rate1 * additionalCCVR / 100), 4);
                 }
                 else
                 {
                     Rate = decimal.Parse(Session["CurrencyRate"].ToString());
                 }
             }
             IncludeCss("HeavyDiscountItems", "/Templates" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/ToolTip/tooltip.css");
             IncludeJs("HeavyDiscountItems", "/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/AspxHeavyDiscount/js/HeavyDiscount.js", "/js/jquery.tipsy.js");
         }
         GetHeavyDiscountSetting();
         IncludeLanguageJS();
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Exemple #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            SecurityPolicy            objSecurity = new SecurityPolicy();
            FormsAuthenticationTicket ticket      = objSecurity.GetUserTicket(GetPortalID);
            if (ticket != null && ticket.Name != ApplicationKeys.anonymousUser)
            {
                if (!IsPostBack)
                {
                    Page.ClientScript.RegisterClientScriptInclude("Paging", ResolveUrl("~/js/Paging/jquery.pagination.js"));
                    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", "/Templates/" + TemplateName + "/css/ToolTip/tooltip.css");

                    IncludeJs("UserDashBoard", "/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", "/js/jquery.tipsy.js");


                    storeID        = GetStoreID;
                    portalID       = GetPortalID;
                    customerID     = GetCustomerID;
                    userName       = GetUsername;
                    cultureName    = GetCurrentCultureName;
                    userModuleIDUD = int.Parse(SageUserModuleID);
                    ModulePath     = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
                    StoreSettingConfig ssc           = new StoreSettingConfig();
                    UserInfo           sageUser      = m.GetUserDetails(GetPortalID, GetUsername);
                    AspxCommonInfo     aspxCommonObj = new AspxCommonInfo();
                    aspxCommonObj.PortalID = portalID;
                    aspxCommonObj.UserName = userName;
                    AspxCommonController objUser     = new AspxCommonController();
                    UsersInfo            userDetails = objUser.GetUserDetails(aspxCommonObj);
                    if (HttpContext.Current.Session.SessionID != null)
                    {
                        sessionCode = HttpContext.Current.Session.SessionID.ToString();
                    }
                    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);
                    }



                    allowMultipleAddress = ssc.GetStoreSettingsByKey(StoreSetting.AllowUsersToCreateMultipleAddress, storeID, portalID, cultureName);
                    CurrencyCodeSlected  = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, storeID, portalID, cultureName);
                    BindUserDetails();
                }
                IncludeLanguageJS();
            }
            else
            {
                if (IsUseFriendlyUrls)
                {
                    if (!IsParent)
                    {
                        Response.Redirect(ResolveUrl(GetParentURL + "/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();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            FormsAuthenticationTicket ticket = SecurityPolicy.GetUserTicket(GetPortalID);
            if (ticket != null && ticket.Name != ApplicationKeys.anonymousUser)
            {
                IncludeCss("WishItemList", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css", "/Templates/" + TemplateName + "/css/ToolTip/tooltip.css");
                IncludeJs("WishItemList", "/js/DateTime/date.js", "/js/MessageBox/jquery.easing.1.3.js",
                          "/js/MessageBox/alertbox.js", "/js/PopUp/custom.js", "/js/jquery.tipsy.js");

                //SageFrameConfig pagebase = new SageFrameConfig();
                //IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
                StoreID     = GetStoreID;
                PortalID    = GetPortalID;
                UserName    = GetUsername;
                CustomerID  = GetCustomerID;
                CultureName = GetCurrentCultureName;
                if (!IsPostBack)
                {
                    MembershipController member     = new MembershipController();
                    UserInfo             userDetail = member.GetUserDetails(GetPortalID, 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);
                string sortByOptions = ssc.GetStoreSettingsByKey(StoreSetting.SortByOptions, 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);
                }
            }
            if (EnableWishList.ToLower() == "true")
            {
                BindWishListItem();
            }
            //IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Exemple #27
0
    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);
    }
Exemple #28
0
    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);
    }
Exemple #29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            ServicePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            SecurityPolicy            objSecurity = new SecurityPolicy();
            FormsAuthenticationTicket ticket      = objSecurity.GetUserTicket(GetPortalID);
            if (ticket != null && ticket.Name != ApplicationKeys.anonymousUser)
            {
                IncludeCss("WishItemList", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css", "/Templates/" + TemplateName + "/css/ToolTip/tooltip.css",
                           "/Modules/AspxCommerce/AspxWishList/css/WishItems.css");
                IncludeJs("WishItemList", "/js/Paging/jquery.pagination.js", "/js/DateTime/date.js", "/js/MessageBox/jquery.easing.1.3.js",
                          "/js/MessageBox/alertbox.js", "/js/PopUp/custom.js", "/js/jquery.tipsy.js", "/js/encoder.js");

                StoreID     = GetStoreID;
                PortalID    = GetPortalID;
                UserName    = GetUsername;
                CustomerID  = GetCustomerID;
                CultureName = GetCurrentCultureName;
                string userModuleID = SageUserModuleID;
                if (userModuleID != "")
                {
                    UserModuleIDWishList = int.Parse(SageUserModuleID);
                }
                GetWishListItemsSettig();
                if (!IsPostBack)
                {
                    MembershipController member     = new MembershipController();
                    UserInfo             userDetail = member.GetUserDetails(GetPortalID, GetUsername);
                    UserEmailWishList = userDetail.Email;
                    if (UserEmailWishList.Contains(","))
                    {
                        string[] commaSeparator = { "," };
                        string[] value          = UserEmailWishList.Split(commaSeparator, StringSplitOptions.RemoveEmptyEntries);
                        UserEmailWishList = value[0];
                    }
                }
                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();
                AllowAddToCart        = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, StoreID, PortalID, CultureName);
                NoImageWishList       = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
                string sortByOptions = ssc.GetStoreSettingsByKey(StoreSetting.SortByOptions, 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);
                }
            }
            if (EnableWishList)
            {
                BindWishListItem();
            }
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Exemple #30
0
    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);
        }
    }