public function getFields($product_class_id)
    {
        $result = &gplcart_static("product.class.fields.$product_class_id");

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

        $result = array();
        $fields = $this->field->getList();

        $ops = array(
            'product_class_id' => $product_class_id
        );

        foreach ((array) $this->product_class_field->getList($ops) as $product_class_field) {
            if (isset($fields[$product_class_field['field_id']])) {

                $data = array('values' => $this->field_value->getList(array(
                    'field_id' => $product_class_field['field_id'])));

                $data += $fields[$product_class_field['field_id']];
                $data += $product_class_field;

                $result[$fields[$product_class_field['field_id']]['type']][$product_class_field['field_id']] = $data;
            }
        }

        return $result;
    }
public function getFields($product_class_id)
    {
        $result = &gplcart_static("product.class.fields.$product_class_id");

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

        $result = array();
        $fields = $this->field->getList();

        $ops = array(
            'product_class_id' => $product_class_id
        );

        foreach ((array) $this->product_class_field->getList($ops) as $product_class_field) {
            if (isset($fields[$product_class_field['field_id']])) {

                $data = array('values' => $this->field_value->getList(array(
                    'field_id' => $product_class_field['field_id'])));

                $data += $fields[$product_class_field['field_id']];
                $data += $product_class_field;

                $result[$fields[$product_class_field['field_id']]['type']][$product_class_field['field_id']] = $data;
            }
        }

        return $result;
    }
public function getFields ( $ product_class_id ) { $ result = & gplcart_static ( "product.class.fields.$product_class_id" ) ; if ( isset ( $ result ) ) { return $ result ; } $ result = array ( ) ; $ fields = $ this -> field -> getList ( ) ; $ ops = array ( 'product_class_id' => $ product_class_id ) ; foreach ( ( array ) $ this -> product_class_field -> getList ( $ ops ) as $ product_class_field ) { if ( isset ( $ fields [ $ product_class_field [ 'field_id' ] ] ) ) { $ data = array ( 'values' => $ this -> field_value -> getList ( array ( 'field_id' => $ product_class_field [ 'field_id' ] ) ) ) ; $ data += $ fields [ $ product_class_field [ 'field_id' ] ] ; $ data += $ product_class_field ; $ result [ $ fields [ $ product_class_field [ 'field_id' ] ] [ 'type' ] ] [ $ product_class_field [ 'field_id' ] ] = $ data ; } } return $ result ; }
Returns an array of fields for a given product class
@param integer $product_class_id
@return array
Returns an array of fields for a given product class