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;
    }