private void GetMegaCategorySetting() { AspxCommonInfo aspxCommonObj = new AspxCommonInfo(); aspxCommonObj.StoreID = GetStoreID; aspxCommonObj.PortalID = GetPortalID; aspxCommonObj.CultureName = GetCurrentCultureName; JavaScriptSerializer json_serializer = new JavaScriptSerializer(); MegaCategoryController objCat = new MegaCategoryController(); MegaCategorySettingInfo megaCatSetting = objCat.GetMegaCategorySetting(aspxCommonObj); if (megaCatSetting != null) { object obj = new { ModeOfView = megaCatSetting.ModeOfView, NoOfColumn = megaCatSetting.NoOfColumn, ShowCatImage = megaCatSetting.ShowCategoryImage, ShowSubCatImage = megaCatSetting.ShowSubCategoryImage, Speed = megaCatSetting.Speed, Effect = megaCatSetting.Effect, EventMega = megaCatSetting.EventMega, Direction = megaCatSetting.Direction, MegaModulePath = MegaModulePath }; Settings = json_serializer.Serialize(obj); } }
public List<MegaCategorySettingInfo> MegaCategorySettingUpdate(string SettingValues, string SettingKeys, AspxCommonInfo aspxCommonObj) { try { MegaCategoryController mega = new MegaCategoryController(); List<MegaCategorySettingInfo> lstGetMegaCategorySetting = mega.MegaCategorySettingUpdate(SettingValues, SettingKeys, aspxCommonObj); return lstGetMegaCategorySetting; } catch (Exception ex) { throw ex; } }
public MegaCategorySettingInfo GetMegaCategorySetting(AspxCommonInfo aspxCommonObj) { try { MegaCategoryController mega = new MegaCategoryController(); MegaCategorySettingInfo lstGetMegaCategorySetting = mega.GetMegaCategorySetting(aspxCommonObj); return lstGetMegaCategorySetting; } catch (Exception ex) { throw ex; } }
private void GetMegaCategorySetting (AspxCommonInfo aspxCommonObj) { MegaCategoryController objCat = new MegaCategoryController(); MegaCategorySettingInfo megaCatSetting = objCat.GetMegaCategorySetting(aspxCommonObj); if (megaCatSetting != null) { modeOfView = megaCatSetting.ModeOfView; noOfColumn = megaCatSetting.NoOfColumn; showCatImage = megaCatSetting.ShowCategoryImage; showSubCatImage = megaCatSetting.ShowSubCategoryImage; speed = megaCatSetting.Speed; effect = megaCatSetting.Effect; eventMega = megaCatSetting.EventMega; direction = megaCatSetting.Direction; } }
private void GetCategoryMenuList(AspxCommonInfo aspxCommonObj) { categoryImagePath = "Modules/AspxCommerce/AspxCategoryManagement/uploads/"; string scriptAdd = string.Empty; string modulePath = this.AppRelativeTemplateSourceDirectory; hst = AppLocalized.getLocale(modulePath); MegaCategoryController objCat = new MegaCategoryController(); List<MegaCategoryViewInfo> megaCatIfo = objCat.GetCategoryMenuList(aspxCommonObj); if (megaCatIfo != null && megaCatIfo.Count > 0) { int categoryID = 0; StringBuilder catListmaker = new StringBuilder(); if (modeOfView == "vertical") { catListmaker.Append( "<div id=\"divCatHeader\" class=\"divHeaderTitle\"><h2 class=\"cssClassLeftHeader\"><span>"); catListmaker.Append(getLocale("Categories")); catListmaker.Append("</span>"); catListmaker.Append( "<a class=\"cssRssImage\" href=\"#\" style=\"display: none\"><img id=\"categoryRssImage\" alt=\"\" src=\"\" title=\"\" /></a></h2></div>"); catListmaker.Append("<ul class='mega-menuV' id='divMegaMenu'>"); } else if (modeOfView == "horizontal") { catListmaker.Append("<ul class='mega-menuH' id='mega-menuH'>"); } else { catListmaker.Append("<div id=\"divCatHeader\" style='display:none'><span>"); catListmaker.Append(getLocale("Categories")); catListmaker.Append("</span></div>"); catListmaker.Append("<ul class='mega-menuV cssMegaCategoryLi' id='divMegaMenu'>"); catListmaker.Append("<div class=\"cssCollapable\"><h2><span>"); catListmaker.Append(getLocale("All Categories")); catListmaker.Append("</span><a class=\"cssRssImage\" href=\"#\" style=\"display: none\"><img id=\"categoryRssImage\" alt=\"\" src=\"\" title=\"\" /></a></h2></div>"); } foreach (MegaCategoryViewInfo eachCat in megaCatIfo) { categoryID = eachCat.CategoryID; if (eachCat.CategoryLevel == 0) { catListmaker.Append("<li><a href=\""); catListmaker.Append(aspxRedirectPath); catListmaker.Append("category/"); string strRet = AspxUtility.fixedEncodeURIComponent(eachCat.AttributeValue); catListmaker.Append(strRet); catListmaker.Append(SageFrameSettingKeys.PageExtension); catListmaker.Append("\">"); catListmaker.Append(eachCat.AttributeValue); catListmaker.Append("</a>"); if (eachCat.ChildCount > 0) { catListmaker.Append("<ul>"); catListmaker.Append(BindChildCategory(megaCatIfo, categoryID, aspxCommonObj)); if (showCatImage == true) { if (eachCat.CategoryImagePath != null && eachCat.CategoryImagePath != "") { //Resize Image Dynamically InterceptImageController.ImageBuilder(eachCat.CategoryImagePath, ImageType.Medium, ImageCategoryType.Category, aspxCommonObj); string imagePath = aspxRedirectPath + categoryImagePath + eachCat.CategoryImagePath; catListmaker.Append("<div class=\"classCatImage\"><img src=\""); catListmaker.Append(imagePath.Replace("uploads", "uploads/Medium")); catListmaker.Append("\" alt=\""); catListmaker.Append(eachCat.AttributeValue); catListmaker.Append("\" title=\""); catListmaker.Append(eachCat.AttributeValue); catListmaker.Append("\" /></div>"); } } catListmaker.Append("</ul>"); } catListmaker.Append("</li>"); } } catListmaker.Append("</ul>"); catListmaker.Append("<div id=\"sf-Responsive-Cat\" style=\"display:none;\">"); catListmaker.Append("<div id=\"sf-CatMenu\">"); catListmaker.Append(getLocale("Categories")); catListmaker.Append("</div>"); catListmaker.Append("<ul class=\"sf-CatContainer\" style=\"display:none;\">"); foreach (MegaCategoryViewInfo eachCat in megaCatIfo) { categoryID = eachCat.CategoryID; if (eachCat.CategoryLevel == 0) { if (eachCat.ChildCount > 0) { catListmaker.Append("<li class=\"parent\">"); } else { catListmaker.Append("<li>"); } catListmaker.Append("<a href=\""); catListmaker.Append(aspxRedirectPath); catListmaker.Append("category/"); string strRet = AspxUtility.fixedEncodeURIComponent(eachCat.AttributeValue); catListmaker.Append(strRet); catListmaker.Append(SageFrameSettingKeys.PageExtension); catListmaker.Append("\">"); catListmaker.Append(eachCat.AttributeValue); catListmaker.Append("</a>"); if (eachCat.ChildCount > 0) { catListmaker.Append("<ul style=\"display:none;\">"); catListmaker.Append(BindResChildCategory(megaCatIfo, categoryID, aspxCommonObj)); catListmaker.Append("</ul style=\"display:none;\">"); } catListmaker.Append("</li>"); } } catListmaker.Append("</ul></div>"); divMegaCategory.InnerHtml = catListmaker.ToString(); } else { string strText = string.Empty; if (modeOfView == "collapseable") { strText = "<div class=\"cssCollapable\"><h2><span>"+getLocale("All Categories")+"</span><a class=\"cssRssImage\" href=\"#\" style=\"display: none\"><img id=\"categoryRssImage\" alt=\"\" src=\"\" title=\"\" /></a></h2></div>"; } strText += ("<span id=\"spanCatNotFound\" class=\"cssClassNotFound\">" + getLocale("This store has no category found!") + "</span>");//Need to add Local Text divMegaCategory.InnerHtml = strText; } }