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

$return
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)
{
    /** @var shopOrdersCollection */
    $orders_collection = $params['collection'];
    $hash = $orders_collection->getHash();

    if (ifset($hash[0]) == $this->id && ifset($hash[1]) == 'myparam') {
        // specify your WHERE condition for the order collection
        $orders_collection->addWhere('...');
        return true;
    }

    return false;
}