product_badge_set.before

Triggered before setting an image badge to a product group.

Shop-Script

Input (passed by reference)

$params array Parameters.
$params['code'] string Code of a default badge or HTML code of a custom badge.
$params['products_id'] array IDs of individually selected products.
$params['hash'] string Hash used to create an instance of a product collection handling class corresponding to selected products.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function productBadgeSetSetBefore(&$params)
{
    shopMyPluginHelper::updateProductsBadges($params);
}