public function update($order_id, array $data)
    {
        $result = null;
        $this->hook->attach('order.update.before', $order_id, $data, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $data['modified'] = GC_TIME;

        $this->prepareComponents($data);

        $result = (bool) $this->db->update('orders', $data, array('order_id' => $order_id));
        $this->hook->attach('order.update.after', $order_id, $data, $result, $this);
        return (bool) $result;
    }
public function update($order_id, array $data)
    {
        $result = null;
        $this->hook->attach('order.update.before', $order_id, $data, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $data['modified'] = GC_TIME;

        $this->prepareComponents($data);

        $result = (bool) $this->db->update('orders', $data, array('order_id' => $order_id));
        $this->hook->attach('order.update.after', $order_id, $data, $result, $this);
        return (bool) $result;
    }
public function update ( $ order_id , array $ data ) { $ result = null ; $ this -> hook -> attach ( 'order.update.before' , $ order_id , $ data , $ result , $ this ) ; if ( isset ( $ result ) ) { return ( bool ) $ result ; } $ data [ 'modified' ] = GC_TIME ; $ this -> prepareComponents ( $ data ) ; $ result = ( bool ) $ this -> db -> update ( 'orders' , $ data , array ( 'order_id' => $ order_id ) ) ; $ this -> hook -> attach ( 'order.update.after' , $ order_id , $ data , $ result , $ this ) ; return ( bool ) $ result ; }
Updates an order
@param integer $order_id
@param array $data
@return boolean
Updates an order