orders_collection

Enables generation of custom order lists in backend screen "Orders".

Shop-Script

Input (passed by reference)

$params array Order collection data array.
$params['collection'] shopOrdersCollection Instance of order collection class.
… your plugin code …

Output

Boolean value denoting whether a user has opened a URL containing a value of 'hash' parameter intended for this specific plugin. Example of such a URL: ?action=orders#/orders/hash=myplugin/myparam The value of 'hash' parameter may contain one or two string identifiers separated by a slash /.

Shop-Script

Plugin code example

PHP

public function ordersCollection($params)
{
    $orders_collection = $params['collection'];
    $hash = $orders_collection->getHash();
    if (ifset($hash[0]) == 'myplugin' && ifset($hash[1]) == 'myparam') {
        $orders_collection->addWhere('...'); //specify your WHERE condition for order collection
        return true;
    }
    return false;
}