product_mass_update

Triggered on mass update of products and their SKUs using shopProductMassUpdate class.

Shop-Script

Input (passed by reference)

$params array Parameters.
$params['skus_changed'] array Modified SKUs or updated products. Array keys are SKU IDs.
$params['products_changed'] array Updated products. Array keys are product IDs.
$params['old_sku_data'] array Old values of modified SKUs. Array keys are SKU IDs.
$params['new_sku_data'] array New values of modified SKUs. Array keys are SKU IDs.
$params['old_product_data'] array New values of updated products. Array keys are product IDs.
$params['old_sku_stocks'] array Old SKU stock counts. Array keys are SKU IDs. Sub-arrays’ keys are stock IDs.
$params['new_sku_stocks'] array New SKU stock counts. Array keys are SKU IDs. Sub-arrays’ keys are stock IDs.
$params['stocks_changed_sku_ids'] array ID of SKUs with modified stock counts.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function productMassUpdate(&$params)
{
    shopMyPluginHelper::processMassUpdateData($params);
}