src/Extension/OrderManipulationExtension.php
public function order(HTTPRequest $request)
    {
        //move the shopping cart session id to past order ids, if it is now an order
        ShoppingCart::singleton()->archiveorderid($request->param('ID'));

        $order = $this->orderfromid();
        if (!$order) {
            return $this->owner->httpError(404, 'Order could not be found');
        }

        return array(
            'Order' => $order,
            'Form' => $this->ActionsForm() //see OrderManipulation extension
        );
    }
public function order(HTTPRequest $request)
    {
        //move the shopping cart session id to past order ids, if it is now an order
        ShoppingCart::singleton()->archiveorderid($request->param('ID'));

        $order = $this->orderfromid();
        if (!$order) {
            return $this->owner->httpError(404, 'Order could not be found');
        }

        return array(
            'Order' => $order,
            'Form' => $this->ActionsForm() //see OrderManipulation extension
        );
    }
Return the {@link Order} details for the current
Order ID that we're viewing (ID parameter in URL).

@param  HTTPRequest $request
@return array of template variables
@throws \SilverStripe\Control\HTTPResponse_Exception