I downloaded the ablecommerce trial version.
- Added a category called "Teste123".
- Inserted a new item in "Teste123":
- The new item is registered in two categories:
- when i access the item in "Teste123" category:
The "Teste123" theme changes to the "Sample Category" theme (it was to still show the "Teste123" theme):
Is there a way to the product page "inherit" the Parent Category theme?
Multiple themes problem
Re: Multiple themes problem
I searched in the code what was the problem.
I don't know if it will break any functionality, I modifed this file:
/App_Code/PageHelper.cs (line 511 to 525, the "BindCmdTheme" method)
Does someone knows if it will break any functionality?
I don't know if it will break any functionality, I modifed this file:
/App_Code/PageHelper.cs (line 511 to 525, the "BindCmdTheme" method)
Code: Select all
public static void BindCmsTheme(Page page, CatalogableBase catalogObject)
{
string theme = catalogObject.ActiveTheme;
if (!string.IsNullOrEmpty(theme))
{
if (CommerceBuilder.UI.Styles.Theme.Exists(theme))
{
page.Theme = catalogObject.ActiveTheme;
}
else
{
//INVALID THEME SPECIFIED, LOG WARNING
Logger.Warn("Invalid theme '" + theme + "' specified for catalog item " + catalogObject.Name + "; theme not applied.");
}
}else
{
int categoryId = GetCategoryId(true);
var cat = CategoryDataSource.Load(categoryId);
if (!String.IsNullOrEmpty(cat.Theme))
{
page.Theme = cat.Theme;
}
}
}