Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2010
    Posts
    14
    Plugin Contributions
    0

    Default Question regarding images in the "add product" section

    I don't know where else to put this, and I'm hoping someone might be able to steer me towards an answer if one exists... here goes:

    I have over 8000 products I have to manually enter into my shop - extremely time consuming, but no proper csv exists of my products. To help alleviate some of the tasks, I uploaded all 8000 images to the server, each one is an uppercase name with a lowercase .jpg extension (E.g. SNAA12.jpg).

    The way I am doing it now is alt tabbing back and forth and copying and pasting info into my cart; title, type in the price, paste description, type in quantity, paste the item ID and paste it again in the image section and add a .jpg afterwards.

    I know it sounds silly, but having to type in that .jpg every single time is beginning to be a pain. I am wondering if there is any add on or mod that will automatically add in the same item ID and add a .jpg to the end of it so I can skip having to add it manually...

    Any suggestions? I know in the price section, when you add in the price, it automatically fills in the next box, that is kind of what I would like to have for the image (already on server) field.

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

    Default Re: Question regarding images in the "add product" section

    Quote Originally Posted by jax2 View Post
    I don't know where else to put this, and I'm hoping someone might be able to steer me towards an answer if one exists... here goes:

    I have over 8000 products I have to manually enter into my shop - extremely time consuming, but no proper csv exists of my products.
    <snip>
    Any suggestions?
    Yes. Find an easier way. Assuming it takes 2 minutes to add each product, it is going to take well over a month, working 8 hours a day, 7 days a week to add them all.

    You obviously know that csv files can be imported into ZenCart, and you probably know that there are several tools/addons specifically written for this purpose.

    My advice would be to familiarize yourself with one of these tools by exporting and importing the products you've already entered, and when you've become familiar with the .csv requirements you can then use a spreadsheet to add the rest of your products, making judicious use of the cut n paste facilities provided by such programs.

    It'll take a couple of days or so to become familiar with the process, but in the long run you'll be saving yourself a LOT of time and effort.

    Cheers
    RodG

  3. #3
    Join Date
    Feb 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: Question regarding images in the "add product" section

    I thought the same thing, however, my supplier DOES provide CSV's, just nowhere near how the shop CSV is set up. They do not list categories, the images are in a completely different CSV file...

    I have already exported my shops 800+ inventory I've already done and looked at how I could add new products to the csv from theirs, and it seems like it would actually be MORE difficult than adding them manually, which, btw, I have timed lol... it's 40 seconds almost on the dot per item, and I calculated the exact same way you did, figuring still over a month to do! ARGH! That's why I figured hey, if I can tick off an extra 4 or 5 seconds of having to tab (or click) and enter a ".jpg" it would significantly reduce my input time.

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

    Default Re: Question regarding images in the "add product" section

    Quote Originally Posted by jax2 View Post
    That's why I figured hey, if I can tick off an extra 4 or 5 seconds of having to tab (or click) and enter a ".jpg" it would significantly reduce my input time.
    OK, so here's what you'll need to do:

    load the file /youradmin/includes/modules/update_product.php into a text editor

    Find the line that reads:

    Code:
     $sql_data_array['products_image'] = zen_db_prepare_input($_POST['products_image']);
    Change it to

    Code:
    $sql_data_array['products_image'] = zen_db_prepare_input($_POST['products_image']).".jpg" ;
    Save the file, and give it a try. I'll either do what you need, or cause a syntax error. Hopefully the former. :)

    Cheers
    RodG

  5. #5
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,740
    Plugin Contributions
    22

    Default Re: Question regarding images in the "add product" section

    Quote Originally Posted by jax2 View Post
    I thought the same thing, however, my supplier DOES provide CSV's, just nowhere near how the shop CSV is set up. They do not list categories, the images are in a completely different CSV file...
    RodG's previous replies are true to the point - you should really familiarize yourself with using those CSV files. I've seen hundreds of supplier CSVs and not one single file that was ready to be imported into Zen Cart out of the box. It's all about re-arranging the columns, that's all there is to it.
    As for the images CSV file - that's a really simple one. I'm assuming that file has an identifier column (based on products ID or SKU or whatever). Whether you're using Excel or OpenOffice Calc, you can enter the same formula required to update your database using an SQL patch.

    Let's say column A is your SKU (which you would use as products_model), and column B is image file name.
    In Excel, use column C and enter the following:
    Code:
    UPDATE products SET products_image = '
    Now, column D would contain:
    Code:
    ' WHERE products_model =
    And column E will have
    Code:
    ;
    Select those cells, pull selection all the way to the bottom and use "Fill->Down" to get the same values for all rows.
    Now go to column F and enter:
    Code:
    =C1&B1&D1&A1&E1
    and press Enter.
    Column F should now look like:
    Code:
    UPDATE products SET products_image = 'someimage.jpg' WHERE products_model = 123456;
    Now, select that cell, pull selection to the bottom and use "Fill->Down". The formula gets copied and relevant data is added.

    And, finally, copy all that new data into your admin->Tools->SQL Patches and click execute. Voila, ALL images entered. Of course, you'll need to upload images via FTP. Oh, and you MUST backup your database before running this, especially if it's your first time - you might crash the database and lose all work you've done... Just be careful...

    This may see complicated at first, but rest assured it's as simple as it gets. I've used EasyPopulate and this type of SQL patches on a daily basis back in the days I had a computer shop - my suppliers had sent me new CSV files with thousands of products every morning - it took me about 15 minutes to update all 3 suppliers with over 10.000 products...

    Regards,
    Leonard

 

 

Similar Threads

  1. v139h Question regarding "Contact Us" text on Call for Price
    By joealix in forum General Questions
    Replies: 9
    Last Post: 31 Mar 2016, 06:43 PM
  2. Replies: 8
    Last Post: 27 Mar 2011, 04:03 PM
  3. Replies: 0
    Last Post: 17 Mar 2010, 05:24 PM
  4. Remove "Add: [ ]" and "Add selected products to cart" from product pages? possible?
    By edwardtilbury in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Sep 2008, 03:13 AM
  5. For images, does "base" = "small"? And a question about alternates.
    By molywerks in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 29 Feb 2008, 02:49 PM

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