Import of txt/csv into Umbraco [closed]
I need to import a product catalog on a regular basis. It consist right now of one single file (a report with redundant data) but can be split inro 3-4 (clean, non-redundant) text or csv files with a total of aprox. 1500 rows (users, normal product, u开发者_StackOverflow中文版ser specific products and discount prices for customers). Each row should end up in Umbraco as a new node, or an update to an existing node.
Users and normal products are just inserted under the same node (well, two nodes. One for users, one for products).
Discounts and users specific products should be inserted under the user node (created when importing the users)
For each import this should happen:
- If item is not in Umbraco then create it
- If item is present in Umbraco then update it
- If item is in Umbraco but not in the file then hide it
BR. Anders
UPDATE:
Plugin CMSImport should be able to insert records under existing node. Only the hinding of records is not standard. I can think of severel ways to do that. First run import and set timestamp. Then unpublish all with old timestamp (not imported in this run)
Bit in a hurry atm, but you can use my Umbraco plugin CMSImport for this. CMSImport 2.0 which will be released tomorrow can import complete productcatalogs for the various Umbraco shop solutions Teacommerce/Uwebshop.
Only thing that it doesn't do is the hiding of products when it's not in the datasource you are importing from. But it comes with a great event system so it should only be a few lines of code to to this.
CMSImport is a commercial package if you need the update functionality. There is a free edition you can try, download it here http://our.umbraco.org/projects/developer-tools/cmsimport/
If you need the Pro/paid version check it out there. http://www.cmsimport.com/ All 2.0 features and documentation will be uploaded tomorrow.
Thanks,
Richard
精彩评论