products_add_sets.before

Triggered before adding of a product group to sets.

Shop-Script

Input (passed by reference)

$params array Parameters.
$params['set_ids'] array IDs of sets to which product will be added.
$params['new_set_id'] int ID of a new set, to which products will be added, if the new set was created via the products-to-sets-adding dialog.
$params['hash'] string Hash in the URL of a page in “Products” section if all products on the current page will be added to selected sets.
$params['products_id'] array IDs of products individually selected for adding to sets.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function productsAddSetsBefore(&$params)
{
    shopMyPluginHelper::updateProductsSets($params);
}