on 2018 Apr 26 11:21 AM - last edited on 2024 Feb 04 5:33 AM by postmig_api_4
Hi All,
I have requirement to append categories to supercategory for product using datahub, for that I am using below code in customsaperpproduct-target-datahub-extension.xml.
<attribute override="true">
<name>supercategories</name>
<collection>true</collection>
<transformationExpression>resolve('CanonicalCustomCategory').categoryList</transformationExpression>
<exportCode>supercategories(code,catalogVersion(catalog(id),version))[mode=append]</exportCode>
</attribute>
Consider if I replicate supercetegories :- category1 , category2 first . And if second time I replicate supercetegories :- category1 ,category3 Then in hybris I am getting four categories i.e category1 ,category2,category1 ,category3 I want to remove this duplicate category i.e. "category1 " using datahub What is the best approach for this?
Thank you, Rasika
Request clarification before answering.
If your list of categories is complete than just remove the [mode=append].
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I create custom impex translator added it in supercategy header (in datahub) to resolved this issue
Find attached sample code.link text
Rasika,
I'm not an expert on impex but suspect it's that [mode=append] that causes the duplicates. At least the sample pcm-apparel extensions distributed with the solution book behave as you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.