November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi,
You need to call CatalogContext.Current.SaveCatalogEntry(catalogEntryDto) to save the changes.
Regards.
/Q
We suggest to use the new content APIs, and PackageContent implements IPricing, which has TaxCategoryId property that you can set.
I'm building a scheduled job which which creates variants/skus and I'm not sure how to set the tax category for each variant/sku.
Code as follows:
CatalogEntryDto entryDto = CatalogContext.Current.GetCatalogEntryDto(myEntryId, new CatalogEntryResponseGroup(CatalogEntryResponseGroup.ResponseGroup.CatalogEntryFull));
if (entryDto.CatalogEntry.Count > 0)
{
CatalogEntryDto.VariationRow[] variationRows = entryDto.CatalogEntry[0].GetVariationRows();
if (variationRows.Length > 0)
{
CatalogTaxDto categories = CatalogTaxManager.GetTaxCategories();
if (categories.TaxCategory.Count > 0)
{
variationRows[0].TaxCategoryId = categories.TaxCategory[0].TaxCategoryId;
}
}
}
It goes through the code and sets the taxcategoryid, but it is not set when I go to that specific variant in Catalogue view. Do I need to save it somehow or set something more than the id? The documentation I find is for getting the values, not for setting, so something is missing here.
Help appreciated.
/J