products_types_set.before

Triggered before setting a type for a product group.

Shop-Script

Input (passed by reference)

$params array Parameters.
$params['type_id'] int ID of selected product type.
$params['hash'] string Hash used to create an instance of a product collection handling class corresponding to selected products.
$params['products_id'] array IDs of individually selected products.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function productsTypeSetBefore(&$params)
{
    shopMyPluginHelper::updateProductsTypes($params);
}