Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2007
    Posts
    215
    Plugin Contributions
    0

    Default phpMyAdmin uploads

    I'm trying to upload a csv file of data (by the way not had much luck with easypopulate and don't wish to use it). So, the question is how do I upload data to the DB on my ZenCart installation. If I download all the tables relating to 'products' from the database confusingly it does not include either a name or description of the product. For that one has to download 'products_description' tables. The question is how do I match these two tables?

    For example, suppose I upload 100 new products into the products table of the DB. I don't know what the Product ID will be until it has been uploaded. The MySQL DB will assign these IDs automatically (auto-increment). How will I know which products have been assigned which ID which I will need in order to marry the other upload which must be to the 'products_description' tables?

    Thanks for any help.

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: phpMyAdmin uploads

    Quote Originally Posted by enquirer66 View Post
    The question is how do I match these two tables?
    .
    I'm not trying to be a smartass (for a change) but you'll find the following tutorial to be very beneficial:
    http://www.w3schools.com/SQl/default.asp

    Cheers
    Rod

  3. #3
    Join Date
    Sep 2007
    Posts
    215
    Plugin Contributions
    0

    Default Re: phpMyAdmin uploads

    Thanks, a useful site but I prefer to work with phpMyAdmin. Anyway, I have resolved this now.

  4. #4
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: phpMyAdmin uploads

    I have been using EP (paid version for years) I upload patches of thousands of products with no problems and I can assign the product_id before I add them. (EP tell you the last number in database so you don't have conflict).

    Some things are easier done in phpmyadmin but adding a product isn't one of them since there are multiple tables associated with products. Just my 2 cents.

  5. #5
    Join Date
    Sep 2007
    Posts
    215
    Plugin Contributions
    0

    Default Re: phpMyAdmin uploads

    I've developed a system which I hope will speed up phpmyadmin uploads but the problem I've now got is as follows:

    I uploaded three trial products along with the relevant data. I can see them in the DB (using phpMyAdmin) but I can't see them in my shop - they are nowhere to be found. Can anyone suggest why this is?

  6. #6
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: phpMyAdmin uploads

    Because the product id are usually associated with more than one or 2 tables. Which is why we recommend EP. If you added the product correctly in myphpadmin there are no reason why they won't show up in store front or admin.

  7. #7
    Join Date
    Sep 2007
    Posts
    215
    Plugin Contributions
    0

    Default Re: phpMyAdmin uploads

    The main tables of adding product data are _products and _products_description. However, you are right the product ID no is referenced in various other tables including products attributes,discount_qty,notification,products_xsell and products_music_extra. The key category seems to be 'products_to-categories' without the product id inserted into this table the product won't show. Is it sufficient therefore to upload to these three tables only or does one have to upload to all tables otherwise it will corrupt the DB? Can anyone tell me the distinction between a 'master_category_id' and 'category_id'? It seems that these are generally the same? Many thanks.

  8. #8
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: phpMyAdmin uploads

    The simple answer to your question is:

    The product_id is used by the database as an identifier such as your SSN. There are no 2 people in the US that have the same SSN. Zen Cart uses product_id. Back to my previous post it is found in different tables for a reason. Now not all the tables are called on the page so if you choose to only add the product id to the tables you use now and it works for you then great but if you choose to use any of the other tables at later time you would be beating your finger nails.

    I believe the Master Category is used also when linking product between different categories. If product A is found in Category A and Category B then one of them is Master.

    Otherwise the master and category id are the same. If you choose to move 1 product you must change both the category id and master category otherwise it will affect your results.

    Again this is why I recommend EP, you don't have to take as much chances with editing database. As far as I remember Excel spreadsheets are much easier to deal with the pure SQL.

    Again just an opinion from someone who added 100K products using EP.

  9. #9
    Join Date
    Sep 2007
    Posts
    215
    Plugin Contributions
    0

    Default Re: phpMyAdmin uploads

    I've decided to use phpMyAdmin for uploading data, corrections and other DB maintenance rather than EP for a variety of reasons.
    1. I never quite felt at home with EP and had some problems which seemed to return from time to time which were very frustrating. The volume of posts on this site reflects the issues that many have had, albeit they may stem from not persevering with the initial familiarity of the add-on.
    2. By using a system which is linked to a Filemaker DB I can auto-entry items (those fields which are often '0' or 'NULL', increment ID nos etc etc - really takes a lot of the hassle of updating the site).
    3. phpMyAdmin has lots of useful tools (such as search and delete, replace) and the more one uses it the better at using it one becomes.
    4. I can use all the functionality of Filemaker for checking or cross-referencing items in the shop. e.g. I create a model_no from Filemaker which I upload to ZC - this is a combination of 2 fields in my FM DB (try uploading merged spreadsheet fields).
    5. Using related tables within FM I can link all the relevant tables from ZC.
    6. Maintenance of the DB is much easier including for attributes. I don't think at this stage I will upload attributes direct so my system here is to upload to a category (sub-divided) upon which I can apply bulk attributes without it affecting existing products. Using multiple category links I can then copy/delete these acrosss to the relevant departments. However, I can do maintenance on the attributes tables better using FM uploading only the changed columns.

  10. #10
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: phpMyAdmin uploads

    Interesting, I never heard of Filemaker. It looks interesting.

    I agree with you the EP version available for FREE is not my favorite I stopped using it 2 years ago. There is a different version of EP. Easy Populate Advance. Google it. I paid $65 for it 2 years ago and can't be happier. It is easy to work with since I have more than 100,000 products on one of my sites so I can update them with no problem. You can also customize it to work with additional new database fields then you can upload the new fields to the database on the fly.

    Good Luck With your venture.

 

 

Similar Threads

  1. Uploads
    By deemurphy in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 5 May 2009, 11:58 AM
  2. Uploads?
    By tee-dot in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Jul 2008, 10:51 PM
  3. Product uploads
    By Alan H in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 4 Jul 2006, 01:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg