protected function validateCombinationOptionsProduct($index, &$combination)
    {
        $options = $this->getSubmitted('product_fields.option');

        if (empty($options)) {
            return null;
        }

        $errors = 0;

        foreach ($options as $field_id => $field) {
            if (!empty($field['required']) && !isset($combination['fields'][$field_id])) {
                $this->setErrorRequired("combination.$index.fields.$field_id", $field['title']);
                $errors++;
            }
        }

        return empty($errors);
    }
protected function validateCombinationOptionsProduct($index, &$combination)
    {
        $options = $this->getSubmitted('product_fields.option');

        if (empty($options)) {
            return null;
        }

        $errors = 0;

        foreach ($options as $field_id => $field) {
            if (!empty($field['required']) && !isset($combination['fields'][$field_id])) {
                $this->setErrorRequired("combination.$index.fields.$field_id", $field['title']);
                $errors++;
            }
        }

        return empty($errors);
    }
protected function validateCombinationOptionsProduct ( $ index , & $ combination ) { $ options = $ this -> getSubmitted ( 'product_fields.option' ) ; if ( empty ( $ options ) ) { return null ; } $ errors = 0 ; foreach ( $ options as $ field_id => $ field ) { if ( ! empty ( $ field [ 'required' ] ) && ! isset ( $ combination [ 'fields' ] [ $ field_id ] ) ) { $ this -> setErrorRequired ( "combination.$index.fields.$field_id" , $ field [ 'title' ] ) ; $ errors ++ ; } } return empty ( $ errors ) ; }
Validates option combination fields
@param integer $index
@param array $combination
@return boolean|null
Validates option combination fields