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
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.