开发者

Import of txt/csv into Umbraco [closed]

开发者 https://www.devze.com 2023-03-12 12:57 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

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:

  1. If item is not in Umbraco then create it
  2. If item is present in Umbraco then update it
  3. 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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号