frontend_products

Allows to change products’ properties before displaying in the storefront.

Shop-Script

Input (passed by reference)

$params array Parameters.
$params['products'] array Products.
$params['skus'] array Products’ SKUs.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function frontendProducts($params)
{
    if (!empty($params['products']) && is_array($params['products'])) {
        foreach ($params['products'] as &$product) {
            shopMyPluginHelper::updateProduct($product);
        }
        unset($product);
    }
}