Skip to Content
1
Jul 06, 2018 at 09:25 AM

Create range feature with classification api

142 Views

Hi,

For this range classification feature type, this code always creates the feature value at position 1. Is there a way to specify valueposition 0?

I'm using the classification api. https://help.hybris.com/6.7.0/hcd/8b7a777486691014823afa6e0ed7bb61.html

  FeatureList featureList = classificationService.getFeatures(product1);
 final Feature feature = featureList.getFeatureByCode("Classification/1.0/Measures_Volts.voltage_range");
 println feature
 ClassificationAttributeUnitModel classificationAttributeUnit = classificationSystemService.getAttributeUnitForCode(version, "pct");
 feature.addValue(new FeatureValue(11,'',classificationAttributeUnit));    
 classificationService.setFeatures(product1, featureList);
 modelService.saveAll(product1)