frontend_compare

Triggered on product comparison page in the storefront and allows to modify displayed product properties.

Shop-Script

Input (passed by reference)

$params array Parameters.
$params['products'] array Compared products data.
$params['features'] array Displayed features data. Array keys are feature codes.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function frontendCompare($params)
{
    waLog::dump($params['products'], 'shop/plugins/' . $this->id . '/frontend-compare-products.log');
    waLog::dump($params['features'], 'shop/plugins/' . $this->id . '/frontend-compare-features.log');
}