cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Why we need to use ImpEx translators instead ProductFeature items ?

Former Member
0 Likes
365

Hi all,

could you help me to understand the approach why Hybris uses this

Accepted Solutions (0)

Answers (1)

Answers (1)

geffchang
Active Contributor
0 Likes

You can insert ProductFeature items as ProductFeature, but you would still need to use ProductFeatureValueTranslator.

e.g.

 INSERT_UPDATE ProductFeature; product(code,catalogVersion(catalog(id),version))[unique=true]; classificationAttributeAssignment(classificationClass(code,catalogVersion(catalog(id),version)),classificationAttribute(code,systemVersion(catalog(id),version)))[unique=true]; description; featurePosition; language(isocode)[allownull=true]; qualifier; unit(code,systemVersion(catalog(id),version)); valueDetails; valuePosition[unique=true]; valueType; value[translator=de.hybris.platform.catalog.jalo.classification.impex.ProductFeatureValueTranslator]

The translator is needed, because the attribute/data does not map directly to the Type's attribute. Some processing needs to be done to map / save it correctly. There's also some validation involved (e.g. If it's a boolean, it will check if it's a valid boolean value)