view_category

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

Shop-Script

Input (passed by reference)

$category array Product category properties from the 'shop_category' table.
$category['subcategories'] array List of subcategories.
$category['params'] array Custom category parameters.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function viewCategory(&$category)
{
    $category['description'] = str_replace(' ', ' ', $category['description']);
}