Author Topic: CSV Resource Library's and Images  (Read 20589 times)

Offline quenncy

  • Newbie
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
CSV Resource Library's and Images
« on: November 07, 2012, 08:22:00 PM »
Is there a way to upload images to a certain folder in your /resources/ image folder and incorporate it in to your CSV Resource File so you can gain a Resource ID to include in your Product CSV file?  This will be helpful on the thousand of items I have to enter. I also already have the images setting on my server for my items.


Thanks in Advance,  :D
Quenncy

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4362
  • Karma: +301/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: CSV Resource Library's and Images
« Reply #1 on: November 08, 2012, 12:13:48 PM »
Yes you can import to resource library. There is a small typo in 1 file that you need to change in version 1.1.1 and prior.

Fix:
open file: /admin/model/tool/table_relationships.php
Find line 35:
Code: [Select]
$this->sections['resource_library'] = array(
'id' => 'resource_id',
'relation_ids' => array( 'resource_id', 'type_id' ),

Replace with:
Code: [Select]
$this->sections['resource_library'] = array(
'id' => 'resource_id',
'relation_ids' => array( 'type_id' ),

Steps to import
1. FTP new images to /resources/image/ directory. Do not replace existing
2. Create CSV import file (see example attached)
NOTE: resource.type_id for image type is 1
3. Load CSV 
4. Check Recourse Library for new added images.

Similar any other types can be loaded. In version 1.1.2 resources can be loaded together with products, categories, etc. Improvements are coming
 

« Last Edit: November 08, 2012, 12:15:21 PM by abantecart »
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline quenncy

  • Newbie
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #2 on: November 09, 2012, 03:40:49 AM »
Oh great thanks so much for the answer, it is greatly appreciated.

I do have another question, I use AbanteCart via my hosting server and I have downloaded the upgrade only to manually install 1.1.0 to 1.1.1 but there is nothing in the downloaded upgrade (abantecart.googlecode.com/files/abantecart_v1.1.1.zip) except the XML file with any data shown in the properties but the rest of the files/folders are empty.
Is this all that is needed to upgrade my server files manually from 1.1.0 to 1.1.1 prior to using your instructions above for ver. 1.1.1?

Thanks,
Quenncy
« Last Edit: November 09, 2012, 09:40:14 AM by quenncy »

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2064
  • Karma: +326/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: CSV Resource Library's and Images
« Reply #3 on: November 09, 2012, 06:52:51 AM »
Oh great thanks so much for the answer, it is greatly appreciated.

I do have another question, I use AbanteCart via my hosting server and I have downloaded the upgrade only to manually install 1.1.0 to 1.1.1 but there is nothing in the upgrade (abantecart.googlecode.com/files/abantecart_v1.1.1.zip) except the XML with any data,  meaning the rest of the files/folders is empty except for the package.XML file. Is this all that is needed to upgrade my server files manually prior to using your information above?

Thanks,
Quenncy

upgrade package for v1.1.0 contain only php-files. Just replace files.
p.s. do not forget do backup.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline quenncy

  • Newbie
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #4 on: November 09, 2012, 09:48:30 AM »
Quote
upgrade package for v1.1.0 contain only php-files. Just replace files.
p.s. do not forget do backup.

An may I please have that URL for this upgrade (php-files) that you are speaking of?  The ver. 1.1.1. Upgrade that I downloaded (abantecart.googlecode.com/files/abantecart_v1.1.1.zip) did not have no PhP files, just simply 1 XML file & 7 empty folders as shown in the screen shoot.

Thanks so much for the education,
Quenncy 

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2064
  • Karma: +326/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: CSV Resource Library's and Images
« Reply #5 on: November 09, 2012, 10:06:00 AM »
You have trouble with your unarchiver.
Our package is correct and contains files.
try to install this stuff http://www.7-zip.org/ and unpack
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline quenncy

  • Newbie
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #6 on: November 09, 2012, 11:13:09 AM »
You have trouble with your unarchiver.
Our package is correct and contains files.
try to install this stuff http://www.7-zip.org/ and unpack

I downloaded your new zip program and replaced my winrar program and the upgrade unzipped just fine now. I really don't know why winrar was not unzipping it correctly?

Ok so after unzipping file I attempted to manually upgrade to ver 1.1.1 from 1.1.0 on my server I get only text showing up and no images (Screen Shoot).
Here is what I did, I made a back up copy of all 4 folders first that I was going to replace on my server, then I took the four folders in the "Code" folder and uploaded them to where my others existed (public_html) replacing all the folders and contents.
What should I do now or better yet what am I doing wrong?

Thanks as always in advance my friend,
Quenncy

Offline quenncy

  • Newbie
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #7 on: November 09, 2012, 12:16:17 PM »
You have trouble with your unarchiver.
Our package is correct and contains files.
try to install this stuff http://www.7-zip.org/ and unpack

I downloaded your new zip program and replaced my winrar program and the upgrade unzipped just fine now. I really don't know why winrar was not unzipping it correctly?

Ok so after unzipping file I attempted to manually upgrade to ver 1.1.1 from 1.1.0 on my server I get only text showing up and no images (Screen Shoot).
Here is what I did, I made a back up copy of all 4 folders first that I was going to replace on my server, then I took the four folders in the "Code" folder and uploaded them to where my others existed (public_html) replacing all the folders and contents.
What should I do now or better yet what am I doing wrong?

Thanks as always in advance my friend,
Quenncy

Ok friend, I have found my error it seems. Just as you said earlier "Only the PhP files". I have replace ONLY the PhP files in the upgrade file to my server in the same folders they came from and all works very well it seems.

Thanks so much as you where wonderful.

Thanks again,
Quenncy

Offline quenncy

  • Newbie
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #8 on: November 10, 2012, 01:29:31 PM »
Yes you can import to resource library. There is a small typo in 1 file that you need to change in version 1.1.1 and prior.

Fix:
open file: /admin/model/tool/table_relationships.php
Find line 35:
Code: [Select]
$this->sections['resource_library'] = array(
'id' => 'resource_id',
'relation_ids' => array( 'resource_id', 'type_id' ),

Replace with:
Code: [Select]
$this->sections['resource_library'] = array(
'id' => 'resource_id',
'relation_ids' => array( 'type_id' ),

Steps to import
1. FTP new images to /resources/image/ directory. Do not replace existing
2. Create CSV import file (see example attached)
NOTE: resource.type_id for image type is 1
3. Load CSV 
4. Check Recourse Library for new added images.

Similar any other types can be loaded. In version 1.1.2 resources can be loaded together with products, categories, etc. Improvements are coming

My friend,  well I am still having a bit of trouble if you could straighten me out on the issue it would be greatly appreciated.
I first upgraded from ver. 1.1.0 to 1.1.1 by merely updating all the PhP Files ONLY on my server and all works well there then I done just as directed in the quote above by correcting the typo issue in ver 1.1.1. on line 35,36,37 of  the /admin/model/tool/table_relationships.php & then used your example and created about a 50 lines in a csv file then attempted to import but continue getting this error "Data is empty or corrupted."  I have also attached my a pic of the CSV file that was formed from your example.

Any thoughts or ideas,
Quenncy  :)

Offline quenncy

  • Newbie
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #9 on: November 11, 2012, 10:22:35 PM »
Just checking in to see if anyone might have a answer to the above problem.

Standing by, Thanks ;D
Quenncy

Offline andrew.mikhailyk

  • Newbie
  • *
  • Posts: 25
  • Karma: +5/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #10 on: November 12, 2012, 08:29:50 AM »
Hello.

Please give me example of your CSV file.
Screenshot is not enough, sorry.

Offline quenncy

  • Newbie
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #11 on: November 12, 2012, 11:00:33 AM »
Hello.

Please give me example of your CSV file.
Screenshot is not enough, sorry.

How would you like me to give you a example if not by screenshot?

Awaiting,
Quenncy

Offline quenncy

  • Newbie
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #12 on: November 12, 2012, 12:01:42 PM »
Update:  It has something to do with Office (Excel 2007) because if I save it in a tab delimited txt format it works fine uploading but in any form of comma delimited csv format (mac, ms-dos or delimited csv) it fails every time. Wonder what could cause that issue?

Thanks,
Quenncy

Offline andrew.mikhailyk

  • Newbie
  • *
  • Posts: 25
  • Karma: +5/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #13 on: November 13, 2012, 05:51:06 AM »
In my experience Excel may modify file in unexpected way.
Different versions of Excel may use different symbols/methods to enclosure columns, delimit them, define line end, etc.
You wrote that with TAB delimiter it is OK. Is it fine to you to use TAB delimiter?

Offline quenncy

  • Newbie
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: CSV Resource Library's and Images
« Reply #14 on: November 15, 2012, 12:47:36 AM »
In my experience Excel may modify file in unexpected way.
Different versions of Excel may use different symbols/methods to enclosure columns, delimit them, define line end, etc.
You wrote that with TAB delimiter it is OK. Is it fine to you to use TAB delimiter?

Thanks Friend  ;)

 

Powered by SMFPacks Social Login Mod