Class PackageContent

Class to store information about packages

Inheritance
System.Object
PackageContent
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: 10.8.0
Syntax
[CatalogContentType(GUID = "94db1554-150d-4334-b540-279320ba34ec", DisplayName = "Package", AvailableInEditMode = false)]
[CLSCompliant(false)]
public class PackageContent : EntryContentBase, IReadOnly<CatalogContentBase>, IReadOnly, IContent, IContentData, ILocalizable, ILocale, IVersionable, IRoutable, ISecurable, IMetaClass, ISearchEngineInformation, IChangeTrackable, ICategorizable, IAssociating, IAssetContainer, IPricing, IDimensionalStockPlacement, IStockPlacement
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

PackageContent()

Declaration
public PackageContent()

Properties

ClassTypeId

Gets the class type id.

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

InventoryReference

Gets or sets the product link, which holds inventory data.

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

MaxQuantity

Gets or sets the maximum quantity.

Declaration
[IgnoreMetaDataPlusSynchronization]
[PositiveNumber]
[GreaterThan(TargetProperty = "MinQuantity", ErrorMessage = "/commerce/validation/notlessvalidation")]
public virtual decimal? MaxQuantity { get; set; }
Property Value
Type Description
System.Nullable<System.Decimal>

MinQuantity

Gets or sets the minimum quantity.

Declaration
[IgnoreMetaDataPlusSynchronization]
[PositiveNumber]
public virtual decimal? MinQuantity { get; set; }
Property Value
Type Description
System.Nullable<System.Decimal>

PackageReference

Gets or sets the package content reference

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

PriceReference

Gets or sets a product link, which holds the price data.

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

ShippingDimensions

Gets or sets the dimensions of the shipment.

Declaration
[IgnoreMetaDataPlusSynchronization]
public virtual ShippingDimensions ShippingDimensions { get; set; }
Property Value
Type Description
ShippingDimensions

ShippingPackageId

Gets or sets the shipping package identifier.

Declaration
[IgnoreMetaDataPlusSynchronization]
public virtual int? ShippingPackageId { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

The shipping package identifier.

TaxCategoryId

Gets or sets the tax category.

Declaration
[IgnoreMetaDataPlusSynchronization]
public virtual int? TaxCategoryId { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

TrackInventory

Gets or sets a value indicating whether inventory should be tracked.

Declaration
[IgnoreMetaDataPlusSynchronization]
public virtual bool TrackInventory { get; set; }
Property Value
Type Description
System.Boolean

Weight

Gets or sets the weight.

Declaration
[IgnoreMetaDataPlusSynchronization]
[PositiveNumber]
public virtual double Weight { get; set; }
Property Value
Type Description
System.Double

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