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

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

        $data['modified'] = GC_TIME;
        $result = (bool) $this->db->update('cart', $data, array('cart_id' => $cart_id));

        gplcart_static_clear();

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

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

        $data['modified'] = GC_TIME;
        $result = (bool) $this->db->update('cart', $data, array('cart_id' => $cart_id));

        gplcart_static_clear();

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