Multiple files import

Multiple files import is used for adding multiple files to a product. There is no limitation as to what kind of file you want to add. This can be pictures, text documents, PDF files, etc.

There are 6 fields that are dealing with product files. These are:

  • product_sku
  • product_files_file_name
  • product_files_file_title
  • product_files_file_description
  • product_files_file_url
  • product_files_file_published
  • :!: New in CSV Improved 1.5 product_files_download

Product SKU

The product SKU is used to identify the product for which the files are added. This field is always needed otherwise the system does not know to which product the files belong.

Filename

The name of the file as located in the folder specified in the template used for the import. If the filename cannot be found, the file will not be added and reported missing.

How does CSV Improved check if the file exists?

CSV Improved combines the file path from the template with the filename from the imported file. Assume here that the file path is <your site>components/com_virtuemart/shop_image/product/ and the filename in the imported file is <your site>/components/com_virtuemart/shop_image/product/konyok2.jpg. As CSV Improved combines the path with the filename from the import it becomes <your site>/components/com_virtuemart/shop_image/product/<your site>/components/com_virtuemart/shop_image/product/konyok2.jpg. This file is not found of course.

What needs to be done to fix this? The path of the filename needs to be removed in the imported file. This means the filename becomes konyok2.jpg. When CSV Improved combines the path and the filename now, it becomes <your site>/components/com_virtuemart/shop_image/product/konyok2.jpg and the file can be found if it exists.

Folder management

:!: This seems to be no longer working with Virtuemart 1.1.2

The use of a single folder has the disadvantage that it can become hard to handle a large amount of files. However it is possible to store files in subfolders. To store files in separate folders the following needs to be done:

  • Set the file path to <your site>
  • Set the filename in your file to components/com_virtuemart/shop_image/product/konyok2.jpg
  • Set another filename to media/csv_test_pdf1.pdf

Now as CSV Improved combines the path and filename the following locations:

  • <your site>components/com_virtuemart/shop_image/product/konyok2.jpg
  • <your site>media/csv_test_pdf1.pdf

File path

The file path that is used during import of product files is taken from the template. The default path is <your site>/components/com_virtuemart/shop_image/product/. Thumbnails are placed in the folder resized located in your image path. Default path is <your site>/components/com_virtuemart/shop_image/product/resized.

To change the default path edit your template by going to the import tab and change the file path there. The file path always needs to end with a /.

Thumbnails

When importing multiple files that are images, CSV Improved will try to generate a thumbnail if this is set in the template. Default CSV Improved will not create thumb images. The size of both width and height are taken from the template used for import. The standard thumbnail sizes used are width 90 pixels and height 90 pixels. The width and height are calculated per ratio so the image is not deformed.

File title

A title that describes what the file is about. This is used for example for PDF documents, where the title becomes a downloadable link.

File description

I have no idea what this is used for. If you can tell me please do so. It is supported however.

File URL

File published

Default a file is publised. To publish certain files set this to Y to have the files published. Any other value will unpublish a file.

File downloadable

:!: New in CSV Improved 1.5

This will make the product file a downloadable file. The product will automatically be unpublished to prevent accidental downloads.

Sample file

A sample CSV file would look like this:

~product_sku~^~product_files_file_name~^~product_files_file_title~^~product_files_file_description~^~product_files_file_url~^~product_files_file_published~
~Product1~^~product1.jpg~^~Our first product~^~~^~http://www.mystore.com/components/com_virtuemart/shop_image/product/product1.jpg~^~N~ 
~Product2~^~product2.jpg~^~Our second product~^~~^~http://www.mystore.com/components/com_virtuemart/shop_image/product/product2.jpg~^~N~ 
~Product3~^~product3.doc~^~Our third product~^~~^~http://www.mystore.com/components/com_virtuemart/shop_image/product/product3.doc~^~Y~
~Product4~^~product4.gif~^~Our fourth product~^~~^~http://www.mystore.com/components/com_virtuemart/shop_image/product/product4.gif~^~Y~
~Product5~^~product5.pdf~^~Our fifth product~^~~^~http://www.mystore.com/components/com_virtuemart/shop_image/product/product5.pdf~^~Y~
 
csvimproved/explained/multiple_files_import.txt · Last modified: 2008/09/28 16:45 by rolandd
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki