view_products.before

Triggered after generation of a product array to be returned by {$wa->shop->products()} method.

Shop-Script

Input (passed by reference)

$collection shopProductsCollection Product collection class instance corresponding to specified hash.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function viewProductsBefore(&$collection)
{
    $collection->orderBy('price');
}