No, in the current XML the sub-nodes have the same code.
<Node>
<Name>Cleaners</Name>
<StartDate>2020-10-24 08:33:00Z</StartDate>
<EndDate>2030-10-24 08:33:00Z</EndDate>
<IsActive>true</IsActive>
<SortOrder>6</SortOrder>
<DisplayTemplate />
<Code>Cleaners</Code>
<MetaData>
<MetaClass>
<Name>CatalogNodeEx</Name>
</MetaClass>
<MetaFields>
<MetaField>
<Name>DisplayName</Name>
<Type>ShortString</Type>
<Data language="fr-ca" value="" />
</MetaField>
<MetaField>
<Name>Published</Name>
<Type>Boolean</Type>
<Data language="fr-ca" value="true" />
</MetaField>
<MetaField>
<Name>Position</Name>
<Type>Integer</Type>
<Data language="fr-ca" value="1" />
</MetaField>
</MetaFields>
</MetaData>
<ParentNode>Accessories</ParentNode>
<SeoInfo />
</Node>
<Node>
<Node>
<Name>Cleaners</Name>
<StartDate>2020-10-24 08:33:00Z</StartDate>
<EndDate>2030-10-24 08:33:00Z</EndDate>
<IsActive>true</IsActive>
<SortOrder>32</SortOrder>
<DisplayTemplate />
<Code>Cleaners</Code>
<MetaData>
<MetaClass>
<Name>CatalogNodeEx</Name>
</MetaClass>
<MetaFields>
<MetaField>
<Name>DisplayName</Name>
<Type>ShortString</Type>
<Data language="fr-ca" value="" />
</MetaField>
<MetaField>
<Name>Published</Name>
<Type>Boolean</Type>
<Data language="fr-ca" value="true" />
</MetaField>
<MetaField>
<Name>Position</Name>
<Type>Integer</Type>
<Data language="fr-ca" value="1" />
</MetaField>
</MetaFields>
</MetaData>
<ParentNode>Room Air Accessories</ParentNode>
<SeoInfo />
</Node>
<Node>
That will not work. Code is the identity of node/entry, so subsequent imports will just override the first one. If you want to have same name but different nodes, you have to have different codes.
It worked. Thanks.
One more thing when I try to update any existing node it basically overwrites the node and removes all the other language values.
Like in the below node structure first I create the "Filters" node and then for the second entry I fired the put call but it removed the values of en-us
<Node>
<Name>Filters</Name>
<StartDate>2020-10-24 08:30:00Z</StartDate>
<EndDate>2030-10-24 08:30:00Z</EndDate>
<IsActive>true</IsActive>
<SortOrder>2</SortOrder>
<DisplayTemplate />
<Code>Filters</Code>
<MetaData>
<MetaClass>
<Name>CatalogNodeEx</Name>
</MetaClass>
<MetaFields>
<MetaField>
<Name>DisplayName</Name>
<Type>ShortString</Type>
<Data language="en-us" value="Filters" />
</MetaField>
<MetaField>
<Name>Published</Name>
<Type>Boolean</Type>
<Data language="en-us" value="true" />
</MetaField>
<MetaField>
<Name>Position</Name>
<Type>Integer</Type>
<Data language="en-us" value="1" />
</MetaField>
</MetaFields>
</MetaData>
<ParentNode>Accessories</ParentNode>
<SeoInfo />
</Node>
<Node>
<Name>Filters</Name>
<StartDate>2020-10-24 08:33:00Z</StartDate>
<EndDate>2030-10-24 08:33:00Z</EndDate>
<IsActive>true</IsActive>
<SortOrder>2</SortOrder>
<DisplayTemplate />
<Code>Filters</Code>
<MetaData>
<MetaClass>
<Name>CatalogNodeEx</Name>
</MetaClass>
<MetaFields>
<MetaField>
<Name>DisplayName</Name>
<Type>ShortString</Type>
<Data language="fr-ca" value="" />
</MetaField>
<MetaField>
<Name>Published</Name>
<Type>Boolean</Type>
<Data language="fr-ca" value="true" />
</MetaField>
<MetaField>
<Name>Position</Name>
<Type>Integer</Type>
<Data language="fr-ca" value="1" />
</MetaField>
</MetaFields>
</MetaData>
<ParentNode>Accessories</ParentNode>
<SeoInfo />
</Node>
<Node>
IIRC it is the default behavior. We talked about how we want to handle it, overwrite, or combine, but no decision has been made.
oh :(
so basically I have to merge my XML node first and then create the complete node once. right?
or is there any workaround for this?
Hi,
I am facing some wired issue while importing catalog and node items using Episerver Commerce service API
Scenario -
My Catalog
I want to create a node name called "Sub node" within different nodes but the API only creates "Sub node" once and returing success for all the node but I am not able to see the other sub nodes.
Any one have any idea on this?