X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Modules and themes (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=64)
-   -   File Attachments Module - Importing links (https://forum.x-cart.com/showthread.php?t=77191)

johngwms 09-21-2019 03:13 AM

File Attachments Module - Importing links
I need to import links for attachments, such as datasheets, brochures, manuals etc for each of my products. As I have over 3,000 products, it will take far too long to manually load each file.

Has anyone been able to work out how to import the links from a csv file?

Ed B. 09-29-2019 06:36 AM

Re: File Attachments Module - Importing links
At a first glance, the models created by file attachment module don't have many columns, so it might sound easy to write an importation module. However, there is
a difficulty.

The file attachment module creates tables "product_attachment_storages",
"product_attachments", "product_attachment_translations" and add a column to the table "product". And there are several "cascade relations". Because of these relations, the tables have to be updated in the right order.

Now, presumably a correct use of Doctrine would take care of "the right order", but I have never done this myself, so I don't know how easy or difficult to put all that in place.

cflsystems 09-29-2019 08:53 AM

Re: File Attachments Module - Importing links
The way I would suggest is direct database import but depending on where you are importing from - data from XC4 database or csv file.
I use this approach with XC4 to XC5 database conversion. Way faster and easier.

Of course a module can be coded as well and it is not that difficult to do.

All times are GMT -8. The time now is 08:16 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.