Jump to content

faster way of adding products in bulk?


Guest

Recommended Posts

Well, if you are using mySQL with phpmyAmin, you can import CSV values generated i.e. from a spreadsheet.

Setting up a spreadsheet

First, setup ALL your fields in a spreadsheet as columns.

Ensure that ALL fields have values in i.e. put zeros in , don't leave cells blank.

Ensure that each an every entry in the product field is unique an doesn't already exist in your table.

To refer to existing images, just use the filename, the images/ is added in the code. (I assume you will have uploaded these by ftp in bulk)

Don't leave blank images empty, refer to nophoto.jpg instead.

Export the data range as a CSV file.

When you export, select to have text fields encased in quotes.

I used commas to seperate the fields

Importing the CSV data in phpmyAdmin

Select the inventory table, at the bottom of the structure page, there is an option to "Insert data from a textfile into table".

Browse for the file

I needed to change the field terminator to a comma

I also checked fields enclosed by quotes optionally.

When it imports, it reports the number of rows inserted successfully.

I keep the product codes for my imported items as having a different three digit prefix to all my other product codes.

That way, if it all goes horribly wrong, I can quickly remove all those items by

DELETE

FROM `store_inventory` 

WHERE LEFT( product, 3 ) 

LIKE 'IMP';

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...