Jump to content

Inserting CSV Data into database


Guest

Recommended Posts

Guest megagente

Backup

Just go to phpmyadmin and browse the table inventory. You will see the title of the fields (remember to have at least one product or will not get the browse), in excel create on the first top of the first line and column start the same order the title fields like: productId,name,description and the others you see in mysql.

You have to learn what each field means. For example the last one is "showFeatured" used when a product goes on front page. Use values 1 for yes and 0 for no. Tax is different I think is 2 for no, just check it yourself.

Remember to fill data with 0 dont leave empty.

In the description field, if you fill with 0 you will see it in the webpage. I recommend to write something, because I was not able to make it null.

One important thing, follow the order of products looking at the producIt, catid and category fields in the catidx table. There you can see the sequence of products you have. Where to start the sequence and the new id numbers.

Go also to the category table to see what category belongs to your products.

Use Excell Autofill to copy or fill series the productId, for example "HYU-001, HYU-002 and so" to make it automatic.

When you finish adding the products in excell export as normal to csv file. Open the csv file with a text editor like notepad (I use Textpad) and delete the title fields. Only leave the information. Dont leave any tab spaces in the top or the bottom and save it.

Go to the sql and of the table inventory and import a text file into table. You will see a screen to input the file from your hard disk. Also you will see an Optional option there, mark it. The other stuff I leave it that way. If everything goes ok you will see a screen telling you the number of new records. Go back and browse the table inventory where you consider the new information is added.

Also you need to add information to the catidx. The catidx has only 3 fields. Sometimes the sequence of the id field is different from the productId field, be carefull just to continue the right sequence. You can use the same productId fields and catid fields you used in excel file to prepare this table. Follow the same procedure you made last time to fill the tables in phpmyadmin.

About the images, be carefull to introduce the right names in excel. Also upload your normal pictures in ftp to the upload folder. Use a program to make auto thumbnails. Check the size of the thumnails you use on the server. Also use a bulks rename software to change the prefix for the thumbs for example: "thumb_imagename.jpg" I use Bulk Renamer

This is the way I do it and with practice you will do it fast. You have any question, ask.

Link to comment
Share on other sites

  • 2 weeks later...

Hi megagente,

I'm using CubeCart 3.0.4. I first manually loaded 3 products using CubeCart administration.

I then uploaded a CSV file to the database. I've modified CubeCart_category to show 74 products and CubeCart_cats_idx so that it has the proper information in it.

When viewing the basic cart I can click on the first 3 items and get a proper item description. However, when I click on "more" on any of the remaining items I get the error message "That product could not be found."

Do you have any idea where in the database that information might be entered?

Thanks,

Kent

Link to comment
Share on other sites

  • 1 month later...

didnt read this whole post, but my CSV v2 (works with CCv3) can now work with tab delimited files..

if you need this.. let me know!! the downloadable one on my site is for comma delimited.. so i will have to personally send you the tab one..

next release of my CSV will have an option to change the delimitor as well as a backup feature

Tony~!

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...