view_product

Triggered on execution of method {$wa->shop->product()} in Smarty templates. Allows modification of product properties before they are returned by the method.

Shop-Script

Input (passed by reference)

$product shopProduct Product properties object.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function viewProduct(shopProduct &$product)
{
    $product->description = str_replace(' ', ' ', $product->description);
}