I'm not very advanced with my use of csv but if one was trying to test out the csv upload by using the default fields perhaps this may come in useful?
I use Excel as I'm more familiar with it than say with Access so hope this will be applicable.
Step 4 is particularly crucial to this.
==============================================================
1. Enter all the fields in order into separate columns in your excel table.
For the sake of convenience, I have attached a text file (fieldheading.txt) with the csv field headers generated when saved from excel. It should be relatively straightforward to import this back into Excel again.
You'll probably have noticed that the csv upload section now comes with a handy '
skip first line' checkbox, I would recommend that this is checked everytime as thefirst row will be the field-headers.
I have also followed the notation of each field for each column - they should be fairly self-explanatory as well. It is possible to remove all the unnecessary field headers from VM as well as the excel file to save on all this space but for 'attempted tutorial' purposes we will keep to the original.
2. Start populating the table with on a per-row basis for each item.
As this is our first test, I suggest just adding one or two items. If you have no need for certain fields, just leave them blank. It is worth noting that certain fields such as
product_sku are
alwaysrequired.
Categories - VM does provide a helpful explanation on how it all works. It is brilliant that VM adds categories automatically when using a csv upload. A quick recap:
Maincat/subcat1 (can be the standard data inputted into the column for product_categories - means that the item will be categorised to 'subcat1')
Maincat/subcat1|Maincat/subcat2 ( means item will be categorised to subcat1
and subcat2)
Manufacturer - If no manufacturers have been added, then I would strongly suggest inputting this field as
1. Otherwise VM tends to generate multiple Generic Manufacturers (if I remember correctly). 1 = default manufacturer.
Excel Fields - I have also found that it is useful to set ALL fields in Excel to the format 'General' instead of eg. Text etc.
Special Characters - Hopefully this might change in future versions of VM (Virtuemart) - but currently with names/descriptions etc. that require special characters such as
', it really helps to always add a
\ before it. It is certainly applicable to categories as well.
For instance:
Betty's Biscuit Tin -> Betty\'s Biscuit Tin
3. Save the file as test.xls
Optional but good for an example perhaps?
4. If on WindowsXP, click on Start->Control Panel->Regional Settings->Language->Delimiter Settings and change the delimiter value (eg. for English(American)) to ; (semicolon)
Everyone has different ways of setting their delimiters. I have found that
; (semi-colon) is particularly useful for me but this may vary for each user. I should add that delimiters separate each column/field (just in case) I have found that changing the delimiter hasn't affected any other programs that I run although it's worth noting that it may affect some programs.
As I am a WindowsXP user I'm not sure if this part is applicable to eg. Linux/Mac users.
5. Save the worksheet from test.xls as test.csv file
It's quite far down the list for the later Office veresion of Excel so you may well have to scroll a bit. It will ask you whether or not you'd like to edit/save etc. when you then change something in the workbook/worksheet, but these can be safely ignored (either clicking Yes/No where applicable)
6. Login to the Joomla! administration backend and click onto the VM (Virtuemart) csv upload. (Use CSV upload) Import/Export tab.
For clarification.
7. Set the delimiter to ; and Field Enclosure Char to none. Check the box for Skip first line Select test.csv and upload the file.
This is the final step and is very important as well. If all goes well then you should then receive a report with upload succeeded (for products of sku blah)
==============================================================
Hopefully this is of some help to others. It is probably not the most ideal way of doing a csv upload (I tend to limit my product uploads from 50-100 items per csv upload) and so far it certainly doesn't cover the more advanced things at present (such as product attributes/product parent id - will build on this in future posts) but it has definitely worked for me.
Comments, criticisms and suggestions are very welcome!
