<<

NAME

ProductOpener::ProductsFeatures - Specify which features (e.g. ingredient list, Nutri-Score) are available for a specific product

DESCRIPTION

ProductOpener::ProductsFeatures is used to turn on or off specific features for a product.

Currently, product features are determined using the product type (e.g. food, pet food, beauty products).

In the future, we may have features that depend on other attributes of the product (for instance its category)

features($feature, $product_ref)

Returns whether a specific feature is available for a product.

Parameters

$feature (input)

The feature to check.

$product_ref (input, optional)

Reference to the product hash.

Currently not used, may be used later to determine features based on product fields (e.g. category).

Return value

1 if the feature is available, undef or 0 otherwise.

<<