private void GetUserRecentActivity() { string SessionCode = string.Empty; string myCartLink = string.Empty; if (HttpContext.Current.Session.SessionID != null) { SessionCode = HttpContext.Current.Session.SessionID.ToString(); } AspxCommonInfo aspxCommonObj = new AspxCommonInfo(); aspxCommonObj.StoreID = GetStoreID; aspxCommonObj.PortalID = GetPortalID; aspxCommonObj.UserName = GetUsername; aspxCommonObj.CultureName = GetCurrentCultureName; aspxCommonObj.CustomerID = GetCustomerID; aspxCommonObj.SessionCode = SessionCode; string modulePath = this.AppRelativeTemplateSourceDirectory; hst = AppLocalized.getLocale(modulePath); string pageExtension = SageFrameSettingKeys.PageExtension; StringBuilder cartHeader = new StringBuilder(); StringBuilder scriptExecute = new StringBuilder(); int cartCount = AspxHeaderController.GetCartItemsCount(aspxCommonObj); StoreSettingConfig ssc = new StoreSettingConfig(); string ShoppingCartURL = ssc.GetStoreSettingsByKey(StoreSetting.ShoppingCartURL, GetStoreID, GetPortalID, GetCurrentCultureName); string AllowAddToCart = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, GetStoreID, GetPortalID, GetCurrentCultureName); SageFrameConfig pagebase = new SageFrameConfig(); bool IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls); StringBuilder recentActivity = new StringBuilder(); recentActivity.Append("<h2>"); recentActivity.Append(getLocale("Recent Activities")); recentActivity.Append("</h2>"); recentActivity.Append("<li>"); recentActivity.Append("<input type=\"hidden\" name=\"dashitemwishmenu\" />"); recentActivity.Append("</li>"); if (AllowAddToCart.ToLower() == "true") { if (IsUseFriendlyUrls) { myCartLink = ShoppingCartURL + pageExtension; } else { myCartLink = ShoppingCartURL; } recentActivity.Append("<li>"); recentActivity.Append(getLocale("Your Carts Contains:")); recentActivity.Append("<a href=\""); recentActivity.Append(myCartLink); recentActivity.Append("\">"); recentActivity.Append(cartCount); recentActivity.Append(" "); recentActivity.Append("items"); recentActivity.Append("</a>"); recentActivity.Append("</li>"); } ltrRecentActivity.Text = recentActivity.ToString(); }
protected void Page_Load(object sender, EventArgs e) { try { SageFrameConfig pagebase = new SageFrameConfig(); if (HttpContext.Current.Session.SessionID != null) { SessionCode = HttpContext.Current.Session.SessionID.ToString(); } if (!IsPostBack) { IncludeCss("AspxHeaderControl", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css"); IncludeJs("AspxHeaderControl", "/js/PopUp/custom.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/Modules/AspxCommerce/AspxHeaderControl/js/HeaderControl.js"); if (HttpContext.Current.Request.UrlReferrer != null) { string urlContent = HttpContext.Current.Request.UrlReferrer.AbsolutePath; if (urlContent.Contains(pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage)) && UserName.ToLower() != "anonymoususer") { FrmLogin = true; if (HttpContext.Current.Session["LoginMessageInfo"] == null) { HttpContext.Current.Session["LoginMessageInfo"] = true; } int x = Convert.ToInt32(HttpContext.Current.Session["LoginMessageInfoCount"]); HttpContext.Current.Session["LoginMessageInfoCount"] = x + 1; } else if (HttpContext.Current.Session["LoginMessageInfo"] != null) { HttpContext.Current.Session.Remove("LoginMessageInfo"); HttpContext.Current.Session.Remove("LoginMessageInfoCount"); } } AspxCommonInfo aspxCommonObj = new AspxCommonInfo(); aspxCommonObj.StoreID = StoreID; aspxCommonObj.PortalID = PortalID; aspxCommonObj.CultureName = CultureName; HeaderType = AspxHeaderController.GetHeaderSetting(aspxCommonObj); RolesManagementController objController = new RolesManagementController(); List <RolesManagementInfo> objRoles = objController.GetPortalRoleSelectedList(GetPortalID, GetUsername); foreach (RolesManagementInfo role in objRoles) { if (role.RoleName == "Publisher") { userRoleBit = 1; } } } IncludeLanguageJS(); // GetCartItemsCount(); if (AllowWishList.ToLower() == "true") { CountWishItems(); } } catch (Exception ex) { ProcessException(ex); } }
public void CountWishItems() { AspxCommonInfo aspxCommonObj = new AspxCommonInfo(); aspxCommonObj.StoreID = StoreID; aspxCommonObj.PortalID = PortalID; aspxCommonObj.UserName = UserName; aspxCommonObj.CultureName = CultureName; aspxCommonObj.CustomerID = CustomerID; aspxCommonObj.SessionCode = SessionCode; string modulePath = this.AppRelativeTemplateSourceDirectory; string pageExtension = SageFrameSettingKeys.PageExtension; int wishCount = 0; if (UserName.ToLower() != "anonymoususer") { wishCount = AspxHeaderController.CountWishItems(aspxCommonObj); } SageFrameConfig sfConfig = new SageFrameConfig(); string LogInURL = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage); string myWishlistLink = ""; string loginLink = ""; if (IsUseFriendlyUrls) { myWishlistLink = WishListURL + pageExtension; loginLink = LogInURL + pageExtension + "?ReturnUrl=" + aspxRedirectPath + myWishlistLink; } else { myWishlistLink = WishListURL; loginLink = LogInURL; } string strWListLink = string.Empty; if (CustomerID > 0 && UserName.ToLower() != "anonymoususer") { strWListLink = " href=\"" + aspxRedirectPath + myWishlistLink + "\""; } else { strWListLink = " href=\"" + aspxRedirectPath + loginLink + "\""; } StringBuilder wishHeader = new StringBuilder(); wishHeader.Append("<a id=\"lnkMyWishlist\""); wishHeader.Append(strWListLink); wishHeader.Append(">"); wishHeader.Append(getLocale("My Wishlist")); wishHeader.Append(" <span class=\"cssClassTotalCount\">[" + wishCount + "]</span>"); wishHeader.Append("</a>"); litWishHead.Text = wishHeader.ToString(); }
private void GetItemCount() { try { AspxCommonInfo commonInfo = new AspxCommonInfo(GetStoreID, GetPortalID, GetUsername, GetCurrentCulture(), GetCustomerID, Session.SessionID); Count = AspxHeaderController.GetCartItemsCount(commonInfo); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ModuleServicePath = ResolveUrl("~") + "Modules/AspxCommerce/AspxCommerceServices/"; aspxCommonObj.StoreID = GetStoreID; aspxCommonObj.PortalID = GetPortalID; aspxCommonObj.CultureName = GetCurrentCultureName; string headerType = AspxHeaderController.GetHeaderSetting(aspxCommonObj); HeaderType = headerType; } IncludeLanguageJS(); }
private void GetUserRecentActivity(AspxCommonInfo aspxCommonObj) { string ShoppingCartURL = string.Empty; string myCartLink = string.Empty; string modulePath = this.AppRelativeTemplateSourceDirectory; hst = AppLocalized.getLocale(modulePath); string pageExtension = SageFrameSettingKeys.PageExtension; StringBuilder cartHeader = new StringBuilder(); StringBuilder scriptExecute = new StringBuilder(); int cartCount = AspxHeaderController.GetCartItemsCount(aspxCommonObj); int wishCount = AspxHeaderController.CountWishItems(aspxCommonObj); StoreSettingConfig ssc = new StoreSettingConfig(); ShoppingCartURL = ssc.GetStoreSettingsByKey(StoreSetting.ShoppingCartURL, GetStoreID, GetPortalID, GetCurrentCultureName); string WishlistURL = "/My-WishList.aspx"; SageFrameConfig pagebase = new SageFrameConfig(); bool IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls); StringBuilder recentActivity = new StringBuilder(); recentActivity.Append("<h2>"); recentActivity.Append(getLocale("Recent Activities")); recentActivity.Append("</h2>"); recentActivity.Append("<li>"); recentActivity.Append("<input type=\"hidden\" name=\"dashitemwishmenu\" />"); recentActivity.Append("<li id='dashMyWishlist'>Your Wishlist Contains:<a href='"); recentActivity.Append(WishlistURL); recentActivity.Append("'> <span class='cssClassTotalCount'>"); recentActivity.Append(wishCount); recentActivity.Append(" items</span></a></li>"); recentActivity.Append("</li>"); if (AllowAddToCart.ToLower() == "true") { myCartLink = ShoppingCartURL + pageExtension; recentActivity.Append("<li>"); recentActivity.Append(getLocale("Your Carts Contains:")); recentActivity.Append("<a href=\""); recentActivity.Append(myCartLink); recentActivity.Append("\"> "); recentActivity.Append(cartCount); recentActivity.Append(" "); recentActivity.Append("items"); recentActivity.Append("</a>"); recentActivity.Append("</li>"); } ltrRecentActivity.Text = recentActivity.ToString(); }
private void GetUserRecentActivity(AspxCommonInfo aspxCommonObj) { string myCartLink = string.Empty; string modulePath = this.AppRelativeTemplateSourceDirectory; hst = AppLocalized.getLocale(modulePath); string pageExtension = SageFrameSettingKeys.PageExtension; StringBuilder cartHeader = new StringBuilder(); StringBuilder scriptExecute = new StringBuilder(); int cartCount = AspxHeaderController.GetCartItemsCount(aspxCommonObj); SageFrameConfig pagebase = new SageFrameConfig(); bool IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls); StringBuilder recentActivity = new StringBuilder(); recentActivity.Append("<h2>"); recentActivity.Append(getLocale("Recent Activities")); recentActivity.Append("</h2>"); recentActivity.Append("<li>"); recentActivity.Append("<input type=\"hidden\" name=\"dashitemwishmenu\" />"); recentActivity.Append("</li>"); if (AllowAddToCart.ToLower() == "true") { if (IsUseFriendlyUrls) { myCartLink = ShoppingCartURL + pageExtension; } else { myCartLink = ShoppingCartURL; } recentActivity.Append("<li>"); recentActivity.Append(getLocale("Your Carts Contains:")); recentActivity.Append("<a href=\""); recentActivity.Append(myCartLink); recentActivity.Append("\">"); recentActivity.Append(cartCount); recentActivity.Append(" "); recentActivity.Append("items"); recentActivity.Append("</a>"); recentActivity.Append("</li>"); } ltrRecentActivity.Text = recentActivity.ToString(); }
public void GetCartItemsCount() { AspxCommonInfo aspxCommonObj = new AspxCommonInfo(); aspxCommonObj.StoreID = StoreID; aspxCommonObj.PortalID = PortalID; aspxCommonObj.UserName = UserName; aspxCommonObj.CultureName = CultureName; aspxCommonObj.CustomerID = GetCustomerID; aspxCommonObj.SessionCode = SessionCode; string modulePath = this.AppRelativeTemplateSourceDirectory; hst = AppLocalized.getLocale(modulePath); string pageExtension = SageFrameSettingKeys.PageExtension; StringBuilder cartHeader = new StringBuilder(); StringBuilder scriptExecute = new StringBuilder(); Count = AspxHeaderController.GetCartItemsCount(aspxCommonObj); string myCartLink = ""; if (AllowAddToCart.ToLower() == "true") { if (IsUseFriendlyUrls) { myCartLink = ShoppingCartURL + pageExtension; } else { myCartLink = ShoppingCartURL; } cartHeader.Append("<a id=\"lnkMyCart\""); cartHeader.Append(" href=\""); cartHeader.Append(aspxRedirectPath); cartHeader.Append(myCartLink); cartHeader.Append("\"><i class='i-mycart'></i>"); cartHeader.Append(getLocale("My Cart") + " <span class=\"cssClassTotalCount\"> [" + Count + "]</span>"); cartHeader.Append("</a>"); litCartHead.Text = cartHeader.ToString(); if (Count == 0) { FrmLogin = false; } } }
private void GetItemCount() { try { AspxCommonInfo commonInfo = new AspxCommonInfo(); commonInfo.StoreID = GetStoreID; commonInfo.PortalID = GetPortalID; commonInfo.CultureName = GetCurrentCulture(); commonInfo.SessionCode = Session.SessionID; commonInfo.CustomerID = GetCustomerID; commonInfo.UserName = GetUsername; Count = AspxHeaderController.GetCartItemsCount(commonInfo); } catch (Exception ex) { throw ex; } }
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, CustomerID, SessionCode); SageFrameConfig sfConfig = new SageFrameConfig(); LogInURL = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage); HeaderSettingInfo objHeaderSetting = new HeaderSettingInfo(); objHeaderSetting = AspxHeaderController.GetHeaderSetting(aspxCommonObj); HeaderType = objHeaderSetting.HeaderType; HeaderItemsCount objHeaderCount = new HeaderItemsCount(); AspxHeaderController objHeader = new AspxHeaderController(); objHeaderCount = objHeader.GetHeaderItemsCount(aspxCommonObj); WishCount = objHeaderCount.WishCount; CartCount = objHeaderCount.CartCount; hst = AppLocalized.getLocale(this.AppRelativeTemplateSourceDirectory);// StoreSettingConfig ssc = new StoreSettingConfig(); ssc.GetStoreSettingParamSeven(StoreSetting.MyAccountURL, StoreSetting.ShoppingCartURL, StoreSetting.ShowAddToCartButton, StoreSetting.AllowAnonymousCheckOut, StoreSetting.AllowMultipleShippingAddress, StoreSetting.MinimumCartSubTotalAmount, StoreSetting.SingleCheckOutURL, out MyAccountURL, out ShoppingCartURL, out AllowAddToCart, out AllowAnonymousCheckOut, out AllowMultipleShipping, out MinCartSubTotalAmount, out SingleAddressChkOutURL, StoreID, PortalID, CultureName); string templateName = TemplateName; if (HttpContext.Current.Session.SessionID != null) { SessionCode = HttpContext.Current.Session.SessionID.ToString(); } if (!IsPostBack) { IncludeCss("AspxHeaderControl", "/Templates/" + templateName + "/css/MessageBox/style.css", "/Templates/" + templateName + "/css/PopUp/style.css", "/Modules/AspxCommerce/AspxHeaderControl/css/module.css"); IncludeJs("AspxHeaderControl", "/js/PopUp/custom.js", "/js/MessageBox/alertbox.js", "/Modules/AspxCommerce/AspxHeaderControl/js/HeaderControl.js");//"/js/jquery.easing.1.3.js", if (HttpContext.Current.Request.UrlReferrer != null) { string urlContent = HttpContext.Current.Request.UrlReferrer.AbsolutePath; if (urlContent.Contains(LogInURL) && UserName.ToLower() != "anonymoususer") { FrmLogin = true; if (HttpContext.Current.Session["LoginMessageInfo"] == null) { HttpContext.Current.Session["LoginMessageInfo"] = true; } int x = Convert.ToInt32(HttpContext.Current.Session["LoginMessageInfoCount"]); HttpContext.Current.Session["LoginMessageInfoCount"] = x + 1; } else if (HttpContext.Current.Session["LoginMessageInfo"] != null) { HttpContext.Current.Session.Remove("LoginMessageInfo"); HttpContext.Current.Session.Remove("LoginMessageInfoCount"); } } } IncludeLanguageJS(); WishListURL = objHeaderSetting.WishListPageName; CountWishItems(aspxCommonObj); } catch (Exception ex) { ProcessException(ex); } }
protected void Page_Load(object sender, EventArgs e) { try { SageFrameConfig pagebase = new SageFrameConfig(); IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls); StoreID = GetStoreID; PortalID = GetPortalID; CustomerID = GetCustomerID; UserName = GetUsername; CultureName = GetCurrentCultureName; StoreSettingConfig ssc = new StoreSettingConfig(); MyAccountURL = ssc.GetStoreSettingsByKey(StoreSetting.MyAccountURL, StoreID, PortalID, CultureName); CategoryMgntPageURL = ssc.GetStoreSettingsByKey(StoreSetting.CategoryMgntPageURL, StoreID, PortalID, CultureName); ItemMgntPageURL = ssc.GetStoreSettingsByKey(StoreSetting.ItemMgntPageURL, StoreID, PortalID, CultureName); ShoppingCartURL = ssc.GetStoreSettingsByKey(StoreSetting.ShoppingCartURL, StoreID, PortalID, CultureName); AllowAddToCart = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, StoreID, PortalID, CultureName); AllowAnonymousCheckOut = ssc.GetStoreSettingsByKey(StoreSetting.AllowAnonymousCheckOut, StoreID, PortalID, CultureName); AllowMultipleShipping = ssc.GetStoreSettingsByKey(StoreSetting.AllowMultipleShippingAddress, StoreID, PortalID, CultureName); MinCartSubTotalAmount = ssc.GetStoreSettingsByKey(StoreSetting.MinimumCartSubTotalAmount, StoreID, PortalID, CultureName); SingleAddressChkOutURL = ssc.GetStoreSettingsByKey(StoreSetting.SingleCheckOutURL, StoreID, PortalID, CultureName); if (HttpContext.Current.Session.SessionID != null) { SessionCode = HttpContext.Current.Session.SessionID.ToString(); } if (!IsPostBack) { IncludeCss("AspxHeaderControl", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css", "/Modules/AspxCommerce/AspxHeaderControl/css/module.css"); IncludeJs("AspxHeaderControl", "/js/PopUp/custom.js", "/js/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/Modules/AspxCommerce/AspxHeaderControl/js/HeaderControl.js"); if (HttpContext.Current.Request.UrlReferrer != null) { string urlContent = HttpContext.Current.Request.UrlReferrer.AbsolutePath; if (urlContent.Contains(pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage)) && UserName.ToLower() != "anonymoususer") { FrmLogin = true; if (HttpContext.Current.Session["LoginMessageInfo"] == null) { HttpContext.Current.Session["LoginMessageInfo"] = true; } int x = Convert.ToInt32(HttpContext.Current.Session["LoginMessageInfoCount"]); HttpContext.Current.Session["LoginMessageInfoCount"] = x + 1; } else if (HttpContext.Current.Session["LoginMessageInfo"] != null) { HttpContext.Current.Session.Remove("LoginMessageInfo"); HttpContext.Current.Session.Remove("LoginMessageInfoCount"); } } AspxCommonInfo aspxCommonObj = new AspxCommonInfo(); aspxCommonObj.StoreID = StoreID; aspxCommonObj.PortalID = PortalID; aspxCommonObj.CultureName = CultureName; HeaderType = AspxHeaderController.GetHeaderSetting(aspxCommonObj); RolesManagementController objController = new RolesManagementController(); List <RolesManagementInfo> objRoles = objController.GetPortalRoleSelectedList(GetPortalID, GetUsername); foreach (RolesManagementInfo role in objRoles) { if (role.RoleName == "Publisher") { userRoleBit = 1; } } } IncludeLanguageJS(); CountWishItems(); } catch (Exception ex) { ProcessException(ex); } }