0 Replies Latest reply on Oct 15, 2020 3:36 AM by Wouter de Boer

    Double classification export format template issue

    Wouter de Boer Active Member

      All,

       

      I want to create an export format template which allows me to use double structure group classifications.

       

      Let me illustrate the example below.

       

      I have the following hierarchy (example)

       

      Catalogus hierarchy

      • Chapter 1: Shirts
        • Item 1: Shirt nike
        • Item 2: Shirt adidas
        • Item 3: Shirt assics
      • Chapter 2: Shorts
        • Item 4: Short nike
        • Item 5: Short adidas
      • Chapter 3: Outfits
        • Item 1: Shirt nike
        • Item 4: Short nike

       

      You can see that the item 1 occurs in chapter 1 and in chapter 3.

       

      I have the following structure for my export format template

       

       

       

      I loop over all the items in the chapters and try to do output the following structure:

      • Chapter 1: Shirts
        • Item 1: Shirt nike
          • Size: M
          • Colour: Red
        • Item 2: Shirt adidas
          • Size: M
          • Colour: Red
        • Item 3: Shirt assics
          • Size: S
          • Colour: Blue
      • Chapter 2: Shorts
        • Item 4: Short nike
          • Size: M
          • Colour: Black
        • Item 5: Short adidas
          • Size: M
          • Colour: Black
      • Chapter 3: Outfits
        • Item 1: Shirt nike
          • Size: M
          • Colour: Red
        • Item 4: Short nike
          • Size: M
          • Colour: Black

       

      I do this by using the following lines in the export template

      Field name
      Code in export format template
      Used in which moduleModule data source / type
      Chapter names{&Item.Structure group(s) (Catalogger Hierarchy).Name (English)} Product groups level 2, 3, 4,5Structure group item / item
      Item names{&Item.Name}ItemsStructure group item / item
      Attribute names{&Attributes.Name (English)}Attribute namesStructure group item / attributes
      Attribute values{&Attributes.Attribute value (English, DEFAULT)(1)}Attribute valuesStructure group item / attributes

       

       

      Issue

      The issue here is that when I loop over item 1 the following line of code in the export template {&Item.Structure group(s) (Catalogger Hierarchy).Name (English)} is retrieving 2 chapter names (Shirts & Outfits) which of course makes sense since the item is classified in both chapters. The first time we loop over item 1 I want that it outputs chapter name Shirts and in the second round I want that it outputs the chapter name Outfit. At the moment it is exporting both names simultaneously and this is messing up my output file.

       

      So how can I make that the parent chapter name is only retrieved once (per chapter)? Please take into account that I don't want to loose the possibility to export the attribute names and attribute values in the same export template which forces me to stick to the current upset of the modules.