November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi,
Currently EPiServer Commerce has no direct functionality to do so, but you can implement it quite easily via ICatalogSystem
For the CatalogSearchParameters, make sure that you set SqlWhereClause to something like this:
parameters.SqlWhereClause = string.Format("1=1 AND MetaClassId = {0}", metaClass.Id);
Or you can create a stored procedure which query for MetaClassId from CatalogEntry table.
Regards.
/Q
Using the MetaClass.Delete() method you can actually delete a MetaClass that is used by catalog entries. As far as I can see, this can lead to strange errors when you try to load the catalog entry again.
Is there any way to check if a MetaClass is actually used by a Catalog Entry before deleting it? I guess this might be a dificult problem, otherwise I would expect EPiServer to have implemented this check already.
However I may be wrong and there could be a simple solution that I haven't found.
Any help is appreciated.
Regards
Anders