Search

Page tree
Skip to end of metadata
Go to start of metadata

The ProductNode is the abstract base class for product elements for all concrete product nodes. It inherits from Product category (CatalogElement).

This class defines the base methods, which are needed to instantiate a product node within the tree structure. Also some important properties are predefined.

The OrderableProductNode is a concrete implementation for a product from class ProductNode. There are more concrete implementations available for ProductNode.


Predefined properties for ProductNode

Each ProductNode has predefined properties. These methods are validated automated on constructor by the validateProperties() method.


Identifier

Identifier

eZ

TypeDescription
nameses_namestringProduct name
skuses_skustringUnique Stock Keeping Unit (SKU) of a product
manufacturerSkuses_manufacturer_skustringStock Keeping Unit (SKU) by a manufacturer of a product
eanses_eanstringEuropean Article Number (EAN) of a product
type
ses_product_type
string

Type of a product, e.g. vegetable

isOrderable
booleanTrue, if a product is orderable
priceses_unit_priceFieldInterfacePrice of a product
customerPrice
PriceField (FieldInterface)Customer price of a product which might be generated from a PriceProvider
scaledPrices

ArrayField
An array with scaled prices and parameters to determine which scale price should be applied
stock
ses_stock_numericFieldInterfaceReturns the stock of  a product
subtitleses_subtitleTextBlockField (FieldInterface)
shortDescription
ses_short_description
TextBlockField (FieldInterface)Short description of a product
longDescriptionses_long_descriptionTextBlockField (FieldInterface)Long description of a product
specificationsses_specificationsFieldInterface[]A list of specifications of a product
imageListses_image_1 .. ses_image_4ImageField[] (FieldInterface[])A list of images
minOrderQuantity
ses_min_order_quantity
float
Minimal order quantity of the product
maxOrderQuantity
ses_max_order_quantity
float
Maximal order quantity of the product
allowedQuantity

string

Regex that indicates the allowed quantity

  • this regex can be evaluated using the preg_match() function by some processes to check if the given quantity corresponds to the allowed quantity
  • values of ProductNodeConstants::ALLOWED_QUANTITY_* can be used

Possible constants:

  • ALLOWED_QUANTITY_INTEGER
  • ALLOWED_QUANTITY_UP_TO_ONE_DECIMAL_PLACE
  • ALLOWED_QUANTITY_UP_TO_TWO_DECIMAL_PLACES
  • ALLOWED_QUANTITY_MULTIPLE_DECIMAL_PLACES
Example for an individual expression: '#^[0-9]+(\.|,)?[0-9]*$#'

If not set the quantity can be int only!

Example:

'allowedQuantity' =>  ProductNodeConstants::ALLOWED_QUANTITY_UP_TO_ONE_DECIMAL_PLACE,
packagingUnit
ses_packaging_unit
float
Packaging unit of the product
unit
ses_unit
string
A unit of the product
vatCode
ses_vat_code
string
VAT code of the product. Needed to determine VAT percent

For every property there is a public setter method

  • No labels