We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    OK, you can try it this way:

    first you have to create a tv where your old docid goes, because you cannot overide docids.
    Name this TV olddocid or something like that.

    1. start the module
    2. no matter which workspace click ’next’
    3. go to tab workspace
    4. type into new workspace: products and in new action you can type: import or what else you want
    5. click ’change’ workspace. Now you have created a new workspace, if all worked fine
    6. go to the tab ’configurations’
    7. choose your csv-file you want to upload
    8. click ’save config’ the file should now be uploaded in the right folder for this workspace
    9. choose your new csv-file as source file
    9. choose the template you want to use for the imported files, if there is no templateid given in your csv-file
    10. click ’save config again’
    11. go to the field config tab
    12. The matching fieldnames should be autoselected. Fill the Form like this:

    Documentfields:
    [table]
    [tr][td]Doc-fields[/td][td]default-values[/td][td]Source-fields[/td][td]Match-fields[/td][td]parent default-values[/td][/tr]
    [tr][td]pagetitle[/td][td][/td][td]pagetitle[/td][td][/td][td][/td][td][/td][td][/td][/tr]
    [tr][td]parent[/td][td][/td][td]parent[/td][td][/td][td][/td][td][/td][td][/td][/tr]
    [tr][td]content[/td][td][/td][td]content[/td][td][/td][td][/td][td][/td][td][/td][/tr]
    [/table]
    TVs:
    [table]
    [tr][td]TV-fields[/td][td]default-values[/td][td]Source-fields[/td][td]Match-fields[/td][td]parent default-values[/td][/tr]
    [tr][td]price[/td][td][/td][td]price[/td][td][/td][td][/td][td][/td][/tr]
    [tr][td]olddocid[/td][td][/td][td]id[/td][td][/td][td][#s#parent#s#][/td][/tr]
    [/table]

    The last row means: Look for document, where olddocid = value of parent in your csv-file. If you find one, use this document as parent.
    If not found and you have checked create parent. Then create first this parent with this value in olddocid and use the new created document as parent.

    If the parentfolder you want to go is not 2 as in your csv-file , but e.G. 5000 you can choose for the row parent also:
    [table]
    [tr][td]Doc-fields[/td][td]default-values[/td][td]Source-fields[/td][td]Match-fields[/td][td]parent default-values[/td][/tr]
    [tr][td]parent[/td][td]5000[/td][td]-empty-[/td][td][/td][td][/td][td][/td][td][/td][/tr]
    [/table]
    If you want to have them published do this:
    [table]
    [tr][td]Doc-fields[/td][td]default-values[/td][td]Source-fields[/td][td]Match-fields[/td][td]parent default-values[/td][/tr]
    [tr][td]Published[/td][td]1[/td][td]-empty-[/td][td][/td][td][/td][td][/td][td][/td][/tr]
    [/table]
    13. go to tab ’start’
    14. remove checkbox ’run in testmode’
    15. push ’run’

    should work this way (did it by me)

    regards Bruno
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 17059
      • 2 Posts
      i’ve tryed to install this module but simply can’t find the reqiered code for the module/plugin-fields (on page 1 of this thread). hope i’m not blind =)
        • 4172
        • 5,888 Posts
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 17059
          • 2 Posts
          thanks ! rolleyes
            • 25663 MODX Staff
            • 12,272 Posts
            Hi Bruno, a couple of things:

            1) Why not put this in the official Extras section on the MODx site? laugh

            2) May be a dumb question, but could the CSV separator be made into some other type of probably-never-used-in-content string of characters (semicolons are definitely common at least in English usage, though double-semicolons aren’t)? That way you could ignore return characters in your content and not have to worry about line-breaks or commonly used characters in your CSV fields.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 7662 ☆ A M B ☆
              • 276 Posts
              Hi
              I can do import:)

              but can’t understand how do export:(

              for instance:
              how export all document in parrent13

              parrent13
              doc1
              doc1doc1
              doc2
              doc2doc1
              doc2doc2
              doc2doc3




                http://modx.im - Russian community
                http://extras.evolution-cms.com - Repository for Evolution
                • 4172
                • 5,888 Posts
                you can go this way:
                1. if you have no unused TV create one. You can name it ’temp’ for example
                2. on tab ’Workspace’ create a new action for example ’export’ if not yet done.
                3. on tab ’Configurations’ type in an export-filename
                4. on tab ’Field-Configs’ choose all fields you want to export
                5. in your temp-TV-field type in the startparent: 13 as default-value
                6. in field parent default-value type in [#d#temp:childIds=`:1`#d#]
                7. choose match-fields for field parent: [#d#parent#d#]
                8. on tab ’Start’ check Export and click ’Run’


                description for my phx-modifier childids:
                /*
                * description: Returns commaseperated list of child IDs belonging to the specified parent.
                * usage: [+variable:childIds=`depth:returnSelf`+]
                * if returnself == ’1’ the startparent is also returned.
                * depth defaults to 10
                */
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 15001
                  • 697 Posts
                  Hi Bruno and all,

                  I’m currently preparing an English version of the tutorial.
                  Bye.

                  J.
                    • 4172
                    • 5,888 Posts
                    nice to hear, thanks! laugh
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 4172
                      • 5,888 Posts
                      hi jul,

                      the plugin is not necessary for working with fast_content_csv. Its an addon if you want start import/export directly from the file-tree.
                      will have to look on that, when I have time.
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!