private void BuildCommonSection(TemplateBuilder builder, int sortOrder)
        {
            var resourceManager = ObjectFactory.Instance.Resolve <IResourceManager>();
            var userService     = ObjectFactory.Instance.Resolve <IUserService>();

            builder.CreateSection(resourceManager.GetLocalizedText(userService.GetCurrentUserCulture(), "Tabs", "Common"), FieldIds.Catalog.SectionCommonId, sortOrder);

            builder.CreateTextField(FieldIds.Catalog.NameFieldId, "Name", 10);
            builder.CreateTextField(FieldIds.Catalog.CatalogIdFieldId, "Catalog id", 20);
            builder.CreateTextField(FieldIds.Catalog.DisplayNameFieldId, "Display name", 30);
            builder.CreateDropdownList(FieldIds.Catalog.DefaultPriceGroupId, "Default price group", 40, FieldIds.SystemContent.PriceGroupsFolderId);
            builder.CreateCheckBoxField(FieldIds.Catalog.ShowPricesWithVatId, "Show prices with VAT", 50);
        }
Exemple #2
0
        private void BuildCommonSection(TemplateBuilder builder, int sortOrder)
        {
            var resourceManager = ObjectFactory.Instance.Resolve <IResourceManager>();
            var userService     = ObjectFactory.Instance.Resolve <IUserService>();

            builder.CreateSection(resourceManager.GetLocalizedText(userService.GetCurrentUserCulture(), "Tabs", "Common"), FieldIds.Category.SectionCommonId, sortOrder);

            builder.CreateTextField(FieldIds.Category.NameFieldId, "Name", 1);
            builder.CreateTextField(FieldIds.Category.CategoryIdFieldId, "Category id", 2);
            builder.CreateTextField(FieldIds.Category.ParentCatalogIdFieldId, "Product catalog id", 3);
            builder.CreateCheckBoxField(FieldIds.Category.DisplayOnSiteFieldId, "Display on site", 6);
            builder.CreateTextField(FieldIds.Category.DisplayNameFieldId, "Display name", 7);
            builder.CreateRichTextEditorField(FieldIds.Category.DescriptionFieldId, "Description", 8);

            // Avoid creating products field on categories if the product data is not included.
            var includeProductData = _dataProviderSettings.IncludeProductData;

            if (includeProductData)
            {
                BuildListOfProductsField(builder, 10);
            }
        }