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

Approach to remove Duplicate categories of product using Datahub before sending product to hybris

Former Member
0 Kudos
974

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

View Entire Topic
tino_kissig
Active Participant
0 Kudos

If your list of categories is complete than just remove the [mode=append].

Former Member
0 Kudos

Hi,

We are experiencing same issue. Super categories are overriding when we remove append mode. (Existing super categories are removing from Product when we trigger IDOCs)

Please let me know if you find solution on this.

thank you.

Regards, Guru

Former Member
0 Kudos

I create custom impex translator added it in supercategy header (in datahub) to resolved this issue

Find attached sample code.link text