Models¶

Danger

We’re sorry but this documentation section is outdated. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you!

Product¶

The Product model represents every unique product in the catalog. By default it contains the following properties:

Property Description
id Unique id of the product
name Product’s name taken from the ProductTranslation
slug Product’s urlized name taken from the ProductTranslation
description Product’s description taken from the ProductTranslation
metaKeywords Product’s meta keywords taken from the ProductTranslation
metaDescription Product’s meta description taken from the ProductTranslation
attributes Attributes assigned to this product
variants Variants assigned to this product
options Options assigned to this product
createdAt Product’s date of creation
updatedAt Product’s date of update

Note

This model uses the Using TranslatableTrait and implements the ProductInterface.

For more detailed information go to Sylius API Product.

ProductTranslation¶

This model is responsible for keeping a translation of product’s simple properties according to given locale. By default it has the following properties:

Property Description
id Unique id of the product translation

Note

This model extends the Implementing AbstractTranslation class and implements the ProductTranslationInterface.

For more detailed information go to Sylius API ProductTranslation.

AttributeValue¶

This AttributeValue extension ensures that it’s subject is an instance of the ProductInterface.

Note

This model extends the AttributeValue and implements the AttributeValueInterface.

For more detailed information go to Sylius API AttributeValue.

Variant¶

This Variant extension ensures that it’s object is an instance of the ProductInterface and provides an additional property:

Property Description
availableOn The date indicating when a product variant is available

Note

This model implements the ProductVariantInterface.

For more detailed information go to Sylius API Variant.