Try our conversational search powered by Generative AI!

Class ProductContent

Class to store information about products

Inheritance
System.Object
ProductContent
Implements
EPiServer.Data.Entity.IReadOnly<CatalogContentBase>
EPiServer.Data.Entity.IReadOnly
EPiServer.Core.IContent
EPiServer.Core.IContentData
EPiServer.Core.ILocalizable
EPiServer.Core.ILocale
EPiServer.Core.IVersionable
EPiServer.Web.Routing.IRoutable
EPiServer.Security.ISecurable
EPiServer.Core.IChangeTrackable
Namespace: EPiServer.Commerce.Catalog.ContentTypes
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0
Syntax
[CatalogContentType(GUID = "06c6768c-c241-494a-9a4d-6a52f307b020", DisplayName = "Product", AvailableInEditMode = false)]
[CLSCompliant(false)]
public class ProductContent : EntryContentBase, IReadOnly<CatalogContentBase>, IReadOnly, IContent, IContentData, ILocalizable, ILocale, IVersionable, IRoutable, ISecurable, IMetaClass, ISearchEngineInformation, IChangeTrackable, ICategorizable, IAssociating, IAssetContainer, IVariantContainer
Remarks

For more information read the Working with the Catalog as IContent article.

Examples

An example of how to create a Commerce content type:

using EPiServer.Commerce.Catalog.ContentTypes;
using EPiServer.Commerce.Catalog.DataAnnotations;
using EPiServer.Core;
using EPiServer.DataAnnotations;

namespace CodeSamples.EPiServer.Commerce.Catalog.Provider { [CatalogContentType] public class CatalogContentTypeSample : VariationContent { [CultureSpecific] [Tokenize] [Encrypted] [UseInComparison] [IncludeValuesInSearchResults] [IncludeInDefaultSearch] [SortableInSearchResults] public virtual string Description { get; set; }

public virtual int Size { get; set; }

[DecimalSettings(18, 0)] public virtual decimal Discount { get; set; } } }

Constructors

ProductContent()

Declaration
public ProductContent()

Properties

ClassTypeId

Gets the class type id.

Declaration
public override string ClassTypeId { get; }
Property Value
Type Description
System.String
Overrides

VariantsReference

Gets or sets the variants content reference

Declaration
[IgnoreMetaDataPlusSynchronization]
public virtual ContentReference VariantsReference { get; set; }
Property Value
Type Description
EPiServer.Core.ContentReference

Implements

EPiServer.Data.Entity.IReadOnly<>
EPiServer.Data.Entity.IReadOnly
EPiServer.Core.IContent
EPiServer.Core.IContentData
EPiServer.Core.ILocalizable
EPiServer.Core.ILocale
EPiServer.Core.IVersionable
EPiServer.Web.Routing.IRoutable
EPiServer.Security.ISecurable
EPiServer.Core.IChangeTrackable

Extension Methods