Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

File Attachments Module - Importing links
 
Reply
   X-Cart forums > X-Cart 5 > Modules and themes (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 09-21-2019, 03:13 AM
  johngwms's Avatar 
johngwms johngwms is offline
 

Senior Member
  
Join Date: Mar 2013
Location: North Wales
Posts: 130
 

Default 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?
__________________
John Legg
www.TheDebugStore.com

5.4.0.5 Business
X-Cart to Zoho Flow
Zoho Flow <-> Zoho Inventory for order processing
NGINX hosted - XC virtual server

upgrading from 4.7.5 Platinum
reBOOT v4 (xcartmods)
reBOOT WordPress Blog
CDSEO Pro (Smack Digital)
Call for Price (Smack Digital)
X-Cart to Zoho CRM (QT) for order processing
Optin Monster pop up forms
Linux hosted - XC virtual server
Reply With Quote
  #2  
Old 09-29-2019, 06:36 AM
 
Ed B. Ed B. is online now
 

eXpert
  
Join Date: Apr 2016
Posts: 221
 

Default 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.
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote

The following user thanks Ed B. for this useful post:
johngwms (09-29-2019)
  #3  
Old 09-29-2019, 08:53 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 13,597
 

Default 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.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
johngwms (09-29-2019)
Reply
   X-Cart forums > X-Cart 5 > Modules and themes (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:44 AM.

   

 
X-Cart forums © 2001-2018