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

Nested Component Synchronization in SmartEdit

0 Likes
1,225

Hi Experts,

I have a component which has a nested component collection (It is created using many to many relationship) . For the first time, When I do the sync, the nested components are synced properly.

Now, If I delete one of the nested components and do sync from Smart Edit, it is not getting reflected in Online version.

Is synchronization of deleted items supported in smartedit?

Hybris version : 6.7

Thanks and Regards,
.

Accepted Solutions (0)

Answers (1)

Answers (1)

Hi ,

You should try to extend AbstractCMSComponentModelVisitor which is responsible for collecting items for synchronization and add the collection of your nested items.
You can take a look at NavigationComponentModelVisitor as an example.

Define your class as a spring bean and then add a mapping for it

     <bean depends-on="cmsVisitors" parent="mapMergeDirective">
         <property name="key">
             <util:constant static-field="your.component.ComponentModel._TYPECODE"/>
         </property>
         <property name="value" ref="yourVisitorBean"/>
     </bean>  

As you can see there is a map named cmsVisitors with the mapping

Kind regards,
Mykola

0 Likes

Thank you for the response.

I missed to mention one point. The NestedComponent is Catalog Unaware. We tried the Visitor implementation but it is not working for this attribute.