protected override void OnLoad(EventArgs e) { if (!IsPostBack) { // Read the texts for empty cart display LocalResourceInfo emptyCartResource = Controller.GetLocalResource(PortalId, "EMPTYCART"); if (emptyCartResource == null) { emptyCartResource = new LocalResourceInfo() { LocalResourceToken = "EMPTYCART", PortalId = PortalId }; EmptyCartResourceId = Controller.NewLocalResource(emptyCartResource); } else { EmptyCartResourceId = emptyCartResource.LocalResourceId; } List <ILanguageEditorInfo> dbLangs = new List <ILanguageEditorInfo>(); foreach (LocalResourceLangInfo lang in Controller.GetLocalResourceLangs(EmptyCartResourceId)) { dbLangs.Add(lang); } lngEmptyCart.Langs = dbLangs; // Read the texts for confirmed order display LocalResourceInfo confirmCartResource = Controller.GetLocalResource(PortalId, "CONFIRMCART"); if (confirmCartResource == null) { confirmCartResource = new LocalResourceInfo() { LocalResourceToken = "CONFIRMCART", PortalId = PortalId }; ConfirmCartResourceId = Controller.NewLocalResource(confirmCartResource); } else { ConfirmCartResourceId = confirmCartResource.LocalResourceId; } dbLangs = new List <ILanguageEditorInfo>(); foreach (LocalResourceLangInfo lang in Controller.GetLocalResourceLangs(ConfirmCartResourceId)) { dbLangs.Add(lang); } lngConfirmCart.Langs = dbLangs; // Cart Navigation Styles CartNavigationControl nav = LoadControl("Controls/CartNavigationControl.ascx") as CartNavigationControl; ddlCartNavigationStyle.DataSource = nav.ImageStyles; ddlCartNavigationStyle.DataBind(); } tplTemplate.CaptionText = LocalizeString("lblTemplate.Text"); tplTemplate.CaptionHelp = LocalizeString("lblTemplate.Help"); base.OnLoad(e); }
public abstract void UpdateLocalResource(LocalResourceInfo resourceInfo);
protected override void OnLoad(EventArgs e) { if (!IsPostBack) { LocalResourceInfo resource = Controller.GetLocalResource(PortalId, "PRODUCTLISTHEADER"); if (resource == null) { resource = new LocalResourceInfo() { LocalResourceToken = "PRODUCTLISTHEADER", PortalId = PortalId }; ProductListHeaderId = Controller.NewLocalResource(resource); } else { ProductListHeaderId = resource.LocalResourceId; } List <ILanguageEditorInfo> dbLangs = new List <ILanguageEditorInfo>(); foreach (LocalResourceLangInfo lang in Controller.GetLocalResourceLangs(ProductListHeaderId)) { dbLangs.Add(lang); } lngHeaderText.Langs = dbLangs; resource = Controller.GetLocalResource(PortalId, "PRODUCTLISTFOOTER"); if (resource == null) { resource = new LocalResourceInfo() { LocalResourceToken = "PRODUCTLISTFOOTER", PortalId = PortalId }; ProductListFooterId = Controller.NewLocalResource(resource); } else { ProductListFooterId = resource.LocalResourceId; } dbLangs = new List <ILanguageEditorInfo>(); foreach (LocalResourceLangInfo lang in Controller.GetLocalResourceLangs(ProductListFooterId)) { dbLangs.Add(lang); } lngFooterText.Langs = dbLangs; resource = Controller.GetLocalResource(PortalId, "PRODUCTLISTEMPTY"); if (resource == null) { resource = new LocalResourceInfo() { LocalResourceToken = "PRODUCTLISTEMPTY", PortalId = PortalId }; ProductListEmptyId = Controller.NewLocalResource(resource); } else { ProductListEmptyId = resource.LocalResourceId; } dbLangs = new List <ILanguageEditorInfo>(); foreach (LocalResourceLangInfo lang in Controller.GetLocalResourceLangs(ProductListEmptyId)) { dbLangs.Add(lang); } lngEmptyList.Langs = dbLangs; } base.OnLoad(e); tplTemplate.CreateImageCallback = CreateThumbHtml; }
public abstract int NewLocalResource(LocalResourceInfo resourceInfo);