Lost password?    Lost username?    Create an account
OverviewDownloadsForumSupport
CSV Improved

CSV Improved

The use and non-use of ID fields

The use of ID fields in import files often gives many users problems, whether this is due to not reading the documentation or expecting different behaviour from CSV Improved is not the question I want to answer here. What I do want to hightlight is the problems that might occur using ID fields.

What is an ID field?

An ID field is a field that holds a unique reference number for data in the database. Examples of ID fields are:

  • product_id: Holds the ID for a product
  • manufacturer_id: Holds the ID for a manufacturer
  • category_id: Holds the ID for a category
  • etc.
In the Available Fields list, these are all the fields that end with _id.

What is the life expectancy of an ID field?

The life expectancy of an ID field can range from days to years. As long as the data does not get deleted from the database the ID stays the same. Regularly deleting and importing new data makes the ID change as often as this process is repeated.

How important is the ID field?

As mentioned earlier, the ID field is unique. This makes it important however not as important as other fields that are more consistent than the ID field. Some examples of more important fields:

  • product_sku: The Stock Keeping Unit will almost never change as it identifies a specific product
  • manufacturer_name: The name of a manufacturer is also unlikely to change
  • category_path: The name of a category is unlikely to change

Even though the ID field is important to the shop, other fields are more important for import.

Which field should I use?

It is advised not to use ID fields for import. CSV Improved will find the correct ID based on the other fields you import. If an ID is ever changed and you don't know about it, the import will go wrong.

Another example is when you are importing new data, the ID field does not exist and nothing will be imported as the database cannot find the ID and your shop will remain empty.

Final words

Be cautious using ID fields in your import file, imports are more likely to succeed not using these fields.

TESTIMONIAL

Excellent Component, features & support
5 stars
2013-08-06
I have used the full/pro versions of CSVI for a few years now & I would recommend it to anybody with a virtuemart site or site where you may need to import anything else.
Not only does it work brilliantly for Virtuemart Stores, but there are also other standard templates for AWO EZ Reality, K2 AUP, Joomla Articles, Users and lots more.
If its not already set up, you can also use the custom field settings & the developer Roland is always on hand providing excellent support and solutions to your CSV related problems.

Roland has helped me out on many occasions with basic CSV stuff and more complicated bespoke CSVi templates.

It's awesome - Really & will save you hours manually inputting products, articles, coupons, etc.

Try the free version & if you like it buy the Pro version as it's easily worth the price you pay.

STAY INFORMED


Stay informed with the CSVI newsletter.