public function getList($prodict_id)
    {
        $result = null;
        $this->hook->attach('product.field.list.before', $prodict_id, $result, $this);

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

        $sql = 'SELECT * FROM product_field WHERE product_id=?';
        $fields = $this->db->fetchAll($sql, array($prodict_id));

        $result = array();
        foreach ($fields as $field) {
            $result[$field['type']][$field['field_id']][] = $field['field_value_id'];
        }

        $this->hook->attach('product.field.list.after', $prodict_id, $result, $this);
        return $result;
    }
public function getList($prodict_id)
    {
        $result = null;
        $this->hook->attach('product.field.list.before', $prodict_id, $result, $this);

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

        $sql = 'SELECT * FROM product_field WHERE product_id=?';
        $fields = $this->db->fetchAll($sql, array($prodict_id));

        $result = array();
        foreach ($fields as $field) {
            $result[$field['type']][$field['field_id']][] = $field['field_value_id'];
        }

        $this->hook->attach('product.field.list.after', $prodict_id, $result, $this);
        return $result;
    }
public function getList ( $ prodict_id ) { $ result = null ; $ this -> hook -> attach ( 'product.field.list.before' , $ prodict_id , $ result , $ this ) ; if ( isset ( $ result ) ) { return $ result ; } $ sql = 'SELECT * FROM product_field WHERE product_id=?' ; $ fields = $ this -> db -> fetchAll ( $ sql , array ( $ prodict_id ) ) ; $ result = array ( ) ; foreach ( $ fields as $ field ) { $ result [ $ field [ 'type' ] ] [ $ field [ 'field_id' ] ] [ ] = $ field [ 'field_value_id' ] ; } $ this -> hook -> attach ( 'product.field.list.after' , $ prodict_id , $ result , $ this ) ; return $ result ; }
Returns an array of fields for a given product
@param integer $prodict_id
@return array
Returns an array of fields for a given product