Page 4 of 8 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 75
  1. #31
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default

    Originally posted by TheWhiteKnight@May 19 2005, 11:25 PM
    Well this IS a blank DB that I am testing it on. I wonder why it is coming back with nothing. Hmmm.... It should be putting the info into the DB instead of returning nothing. It's pulling that info straight out of the Excel sheet too.
    If your database is BLANK, then you cannot use an UPDATE statement....


    INSERT statements ADD records to the database.
    UPDATE statements, well, they update EXISTING information.

    Perhaps you're looking at the wrong set of statements in your spreadsheet for what you're trying to do...
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #32
    Join Date
    Apr 2004
    Location
    Ohio
    Posts
    42
    Plugin Contributions
    0

    Default

    Originally posted by DrByte@May 20 2005, 04:04 AM
    If your database is BLANK, then you cannot use an UPDATE statement....


    INSERT statements ADD records to the database.
    UPDATE statements, well, they update EXISTING information.

    Perhaps you're looking at the wrong set of statements in your spreadsheet for what you're trying to do...
    OMG, I can't believe that I was doing that. To my credit it was late last night when I was working on this, but still.... I'm one STUPID individual. ::ops

    Ok, now I'm on to make my INSERT INTO statements.... ::snk

    Thanks again Doc. I appreciate it. You people at Zen are really great. And after seeing my mistake in the SQL.... I'm SOOOO not worthy.

    - Josh

  3. #33
    Join Date
    Feb 2005
    Location
    Northern Virginia
    Posts
    586
    Plugin Contributions
    0

    Default

    Just be aware when inserting products using this Excel method, that there are several tables involved in the process of adding a product to the database. You will need to use INSERTs in more than just the products table.

    A good way to check this in advance (particularly if you haven't added any products yet) is to add a product using the admin panel and then go look at your database -- view which tables were changed and how.
    Denise

    ... ever amazed at the Power of Zen!

  4. #34
    Join Date
    Apr 2004
    Location
    Ohio
    Posts
    42
    Plugin Contributions
    0

    Default

    Originally posted by dmcl1@May 20 2005, 09:27 AM
    Just be aware when inserting products using this Excel method, that there are several tables involved in the process of adding a product to the database. You will need to use INSERTs in more than just the products table.

    A good way to check this in advance (particularly if you haven't added any products yet) is to add a product using the admin panel and then go look at your database -- view which tables were changed and how.
    Yes, I was looking at that. The more and more I am looking at the table structure of the DB the more I am rrealizing it is going to be more and more involved, but SO worth it in the end.

    From what I can see, it changes these 4 tables (if you modify them with no options):

    categories
    categories_description
    products
    products_description

    (and others if you set attributes and other things)

    It seems that if you just have all of your products not broken down into categories then you will be fine, but if you have them broken down into categories it is going to get more involved. :)

    I just wanted to get the basics out of the way first before I put anything more involved into the coding. I figure if I can get the SQL statements and the references right, the rest should be as easy as adding a few SQL commands as well and more references.

    I'm not super strong on my SQL commands so I don't know if it can be done all in one statement or not (I mean updating multiple tables & data all at once)

    I guess I'm not posting my full thoughts on this even though I should be. I know that since I have found this, I have incurred a few more gray hairs but I am plugging away at it S-L-O-W-L-Y. All I want is ONE HUGE Excel spread sheet with all of my stuff (or at least it all broken down by vehicle/part type) and work it in from there.

  5. #35
    Join Date
    Apr 2004
    Location
    Ohio
    Posts
    42
    Plugin Contributions
    0

    Default

    FYI, I got it to work :) This is NICE and fast.

    Remember when doing this you have to set it up a few times for different tables. Once for the products table, once for the product_description table, and I believe once for the categories table. Also watch your manufacturers_id and category_id or your database will become FUBAR fast.

    Oh yeah also don't delete tables out of your database like I did. I deleted all of the "music" oriented tables and my database crashed. Oh well at least I did this on a test database and can go back in and do this all again quite fast now.

    I had it running just fine here in the test database on my home PC. However, I have one SQL statement that inserts an entire complete record into the database, so the SQL statement is quite large. A lot of concantinations in Excel (which BTW I had no idea you could do in it.) I'm going to export this to OO and see if I can get it to run there too.

    - Josh ::tup

    If anyone wants an actual excel sheet, let me know, I'll be willing to share (if it's ok w/ the admins)

  6. #36
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default

    you might also want to look at products to categories
    Zen cart PCI compliant Hosting

  7. #37
    Join Date
    May 2005
    Posts
    3
    Plugin Contributions
    0

    Default

    how about a copy of that sheet

  8. #38
    Join Date
    Apr 2004
    Location
    Ohio
    Posts
    42
    Plugin Contributions
    0

    Default

    Originally posted by sticky@May 22 2005, 10:30 PM
    how about a copy of that sheet
    Just as an FYI, I emptied the data set in the sheet for you, you'll have to fill in the data, and the pricing, images and stuff, but the coding works (only for the products page) You need to write the other statements for the other tables you need to update in the Database. I'll need an email address to email it to you at.

  9. #39
    Join Date
    Apr 2004
    Location
    Berkshire, UK
    Posts
    1,482
    Plugin Contributions
    1

    Default

    Doesn't this seem a very very long-winded way of doing the same thing as Easypopulate? Or Merlin's quick updates contrib?

    I mean, I wanted to correct a whole load of poor capitalization, and change the word "wigs" to "wig" (for google mainly).
    I just exported an easypopulate file, opened excel, chose the column, find/replace, upload, done. 20 minutes in all, 4000 products taken care of.

    I think I'm missing something here!!

  10. #40
    Join Date
    Apr 2004
    Location
    Ohio
    Posts
    42
    Plugin Contributions
    0

    Default

    Ok, I got this thing to 100% work and I am SOOOO happy.

    If you go in and set up the categories through the Admin panel (which I HIGHLY SUGGEST) then you will only have to modify 3 tables in the database.

    products
    products_description
    products_to_categories

    You should make a print out from PhpMA of your categories so you can keep them all straight in the speradsheet and database.

    I entered 64 products in 10 seconds on my test database, with 3 copy and pastes into the PhpMyAdmin panel. I went back through, cross referenced all of the product ID's with the correct corresponding categories and they are all in the right places. :)

    Kelvyn, I don't have Easypopulate and have never used it, however, I like the OO and Excel way of doing this. Besides It helps sharpen not only your SQL skills but your spreadsheet skills as well. ;)

    Thank you Juxi for the info that allowed me to do this. I really appreciate all the help you posted on this, and also all the help the Zen-staffers gave me on my [horrible at times] SQL.

 

 
Page 4 of 8 FirstFirst ... 23456 ... LastLast

Similar Threads

  1. Replies: 16
    Last Post: 16 May 2016, 06:10 AM
  2. v139h Product Data Dump to Excel
    By kevinmc3 in forum General Questions
    Replies: 1
    Last Post: 17 Jul 2012, 10:13 PM
  3. Insert new Data With SQLScripts Created In Excel
    By twi in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 15 Mar 2012, 10:57 PM
  4. Excel Data Feed
    By Adds in forum General Questions
    Replies: 2
    Last Post: 11 May 2007, 10:51 AM
  5. update products with data manager?
    By elgabi in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 7 Sep 2006, 10:42 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR