Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default upload category images via sql??

    I'm not interested in installing and/or using EasyPopulate, which is why I'm posting this question. Is there a simple sql command , that I can use to upload (inject) images into my categories?

    I don't mind spending the time to build the query, I just don't want my site down for the time it would take to input each and every image via admin. Again, please don't suggest EP.

    Thanks
    I Think, Therefore I Zen. I Zen, Therefore, I AM!
    Personalized Flowers!
    Flowertown Speaking Roses
    using version 1.5.7-06232020

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: upload category images via sql??

    The actual images (the jpg, gif or png files) are best uploaded in bulk via your FTP program. Several hundred can be transferred to your server in a matter of minutes, depending of course on the file size.

    Easypopulate does not "upload images"... it writes information to the database.

    So, you will use easypopulate to create the required references that "couple" your images to their respective products.

    Easypopulate therefore, needs to know what image relates to what product code (model number).

    So, after you have uploaded all your jpg/gif/png files to the images folder via FTP, you will use easypopulate to establish (in the database), the cross-reference that zencart needs to link an image (or several images) to a particular product via its product code (model number).

    You will need - at the very least - to have appropriate data listed in TWO of easypopulate's columns:-

    v_products_model

    and

    v_products_image

    I ALWAYS name my images the same as the product code (model number),

    So... if I have a list of product codes...

    a000100
    a000200
    a000300 (etc)

    my jpegs are named...

    a000100.jpg
    a000200.jpg
    a000300.jpg (etc)

    My easypopulate columns will look like this...

    v_products_model >>>>> v_products_image
    a000100 >>>>>>>>>>>> a000100.jpg
    a000200 >>>>>>>>>>>> a000200.jpg
    a000300 >>>>>>>>>>>> a000300.jpg

    Naturally, you may choose to name your images any way you please, but the key is the relationship that is established between the v_products_model and the v_products_image.
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: upload category images via sql??

    After posting the above, I see that you are "dead against" using easypopulate.

    I find this odd... Why create a lot of extra work for yourself? Even if you build a SQL query, you are still going to have to MANUALLY write each "alter" or "insert" line on the query. (one for each product/image reference you update). The margin for error is very high.

    Believe me... I manage my entire product lists (in once case over 4000 products) in MS Excel. Then, I use easypopulate to make changes. I must have saved hundreds and hundreds of hours using this system.

    Easypopulate takes a couple of minutes to install, and lets you get on with what matters most, devoting time to encouraging customers to buy products - not tinkering for weeks on end with back-end code issues!
    Last edited by schoolboy; 12 Feb 2008 at 11:05 AM. Reason: spelling
    20 years a Zencart User

  4. #4
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default Re: upload category images via sql??

    The Free version of EP doesn't allow for uploading category images, and I am NOT going to pay for EP advanced.

    That's why I said don't even mention EP to me. Not to mention I'm talking about CATEGORY images, not product images.

    Does Anyone know how to write an sql snippet that will add (associate) an image to a category, and/or sub-category?
    I Think, Therefore I Zen. I Zen, Therefore, I AM!
    Personalized Flowers!
    Flowertown Speaking Roses
    using version 1.5.7-06232020

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: upload category images via sql??

    Whether you're talking about CATEGORY images or PRODUCT images makes no difference...

    You don't "upload" images via SQL...

    Perhaps you mean this...

    "How do I write the image reference to the database for Category Images to display?"

    In which case my first line of interest is:-

    Do you have access to phpMyAdmin?

    If this is what you are trying to achieve, please indicate... Then I can try to assist.
    20 years a Zencart User

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: upload category images via sql??

    If you have access to phpMyAdmin, then you will need to write a SQL query that UPDATES the data.

    Go here for a good tutorial...

    http://www.analysisandsolutions.com/...l.htm#updating
    20 years a Zencart User

  7. #7
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default Re: upload category images via sql??

    Whether you're talking about CATEGORY images or PRODUCT images makes no difference...

    You don't "upload" images via SQL...
    Try reading my last post again. I didn't say upload, I said associate! And never mind, I did it manually.
    I Think, Therefore I Zen. I Zen, Therefore, I AM!
    Personalized Flowers!
    Flowertown Speaking Roses
    using version 1.5.7-06232020

  8. #8
    Join Date
    Feb 2008
    Posts
    41
    Plugin Contributions
    0

    Default Re: upload category images via sql??

    schoolboy -

    I don't know about the OP, but I would love to be able to update my category images via phpMyAdmin! I'm doing it manually right now after I had to erase a subcategory and recreate it - very tedious.

    I currently use EP and Excel to manage my products, so I'm familiar with them. I read through the tutorial you linked to, but was a bit lost. I have a test setup on my home computer, so I could try out any instructions in a safe environment.

    Here's what I want to do. Say I have 100 categories. I have images for the categories that are named "category.jpg". I can upload them to my images/categories folder. What do I do in phpMyadmin to write this information to my database?


    I wish there was just a column for this info in EP...

    Thanks in advance!
    Jessica
    Best Friends Quilt Shoppe
    www.bestfriendsquilts.com

  9. #9
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: upload category images via sql??

    There is no easy or fast way to do this - even in phpMyAdmin, or via a SQL command.

    Let's examine why...

    For a SQL command you would need to use "Insert Into" xxxxx "Where Category ID=" xxxxx (and perhaps a bit more command line stuff) then the VALUES to be inserted (then delimited values for each field)... This times 200 if you have 200 categories!

    In phpMyAdmin, The image reference in in the CATEGORIES table, but the categories' NAMES are in the CATEGORIES_DESCRIPTION table...

    ... so you are going to have to either KNOW what each category ID refers to, or export the two tables, amalgamate them, then work out what image reference to insert...

    (I suppose once you've done this, you could build a SQL coimmand that inserts the images against their appropriate category ID, but I'm no SQL expert so perhaps some GURU out there can help further??? )
    20 years a Zencart User

  10. #10
    Join Date
    Feb 2008
    Posts
    41
    Plugin Contributions
    0

    Default Re: upload category images via sql??

    da%n...

    thanks anyway!

    guess that'll teach me not to mess up my categories again, eh? (backup, backup, then make sure you backed up the right stuff, then backup again)

    Back to click, wait... click, click, wait... click, wait... wait... maybe I could get one of my kids to do this...

    thx,
    Jessica

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????
    By shags38 in forum Customization from the Admin
    Replies: 11
    Last Post: 20 Aug 2012, 04:19 AM
  2. SQL command to update category images?
    By Jeff G in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 2 Dec 2009, 10:53 PM
  3. how to i upload multiple images via ftp?
    By mbeltinck in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 25 Feb 2009, 04:13 AM
  4. How do I run the stock_attribute.sql via Install SQL Patches in admin
    By vivaraquel in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 9 Apr 2007, 01:55 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