IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
This happens if the configuration file of your product definition did not get upgraded. Run the script below to add the required configurations:
private
void
TurnOnWorkflowSupportForProductsAndRemoveMisSectionAndAddContentLocationSideBar(SiteInitializer initializer)
{
using
(var catalogManager = CatalogManager.GetManager())
var definitionManager =
new
CatalogDefinitionManager();
var productTypes = catalogManager.GetProductTypes();
foreach
(ProductType type
in
productTypes)
definitionManager.UpdateProductDefinitionsToHaveWorkflowSupport(type);
definitionManager.UpdateProductDefinitionsToHaveContentLocationSideBar(type);
definitionManager.UpdateProductDefinitionsAndRemoveIsActive(type);
definitionManager.SaveChanges();
}
Telerik.Sitefinity.Configuration;
Telerik.Sitefinity.Ecommerce.Catalog.Model;
Telerik.Sitefinity.Workflow.Configuration;
namespace
Telerik.Sitefinity.Modules.Ecommerce.Catalog.Workflows
internal
class
CustomProductTypeWorkflowInstaller : IProductTypeWorkflowInstaller
public
InstallWorkflowForProductType(ProductType productType)
this
.InstallWorkflowForProductType(productType, ConfigManager.GetManager());
InstallWorkflowForProductType(ProductType productType, ConfigManager configManager)
var workflowConfig = Config.Get<WorkflowConfig>();
var workflowElement =
WorkflowElement()
ContentType = productType.ClrType,
ServiceUrl = ProductsWorkflowUrlResolver.GetDefaultWorkflowUrl(
typeof
(Product)),
Title = productType.GetDisplayForWorkflowAndSiteSync(),
ModuleName = EcommerceModule.moduleName
};
if
(!workflowConfig.Workflows.Contains(productType.ClrType))
workflowConfig.Workflows.Add(workflowElement);
configManager.SaveSection(workflowConfig);
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important