Results 1 to 10 of 48

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Orange County, California
    Posts
    544
    Plugin Contributions
    18

    Default Automatically populate category images from their product images

    It's quite tedious to add category images one by one by hand!

    It would be very helpful to automatically pull the category images from the product photos that are contained within.

    I've searched for modules to do this, and have found none. Anyone have any ideas how to tackle the custom coding?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Automatically populate category images from their product images

    Usually a Category has many Products and the Products have 1 to many images ...

    How would you determine from the Products which image should be used for the whole category?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jun 2009
    Location
    Orange County, California
    Posts
    544
    Plugin Contributions
    18

    Default Re: Automatically populate category images from their product images

    By default, i could use the main image from the first product in the category.

    So, for example my product that has sort order "1", and has 3 images:

    101.jpg <-- use this one
    101_2.jpg
    101_3.jpg


    It would be even neater if the product could be specified in the admin:

    Product to display for categories images (by sort order #): 1

    But for me, this is actually not necessary because my products within each subcategory all have the same main image.... ANY product from the category will do fine :)

    I'm just thinking to make it scalable and put into a module for others to use.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Automatically populate category images from their product images

    How often are you making categories that you cannot just tell it the categories image when you set the category image then?

    Or does the Product image for the category change that often that you need to update the category image?

    I am having trouble picturing how a site would be setup where the Categories image is the same as the Product image and all the Products in a Category would use the same image ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jun 2009
    Location
    Orange County, California
    Posts
    544
    Plugin Contributions
    18

    Default Re: Automatically populate category images from their product images

    Well, I'm using easy populate which is quite easy to name all the product images and simply upload to db. Unfortunately the category images are not so simple.

    Manually adding the images by hand to every category is such a chore. This particular store doesn't have an insane number of categories, but it would be so much easier for it to auto-pull the images based on the products inside.

    I know there are lots of others who are in a worse spot than me - they have thousands of products and categories, and would spend upwards of 10-20 hours just uploading category images.

    That's not very efficient. I'd like to make a solution for everyone that can be put in modules section. I imagine it wouldn't be too tough - just a bit of editing to the product-listing.php template to pull a different image from the db?

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Automatically populate category images from their product images

    In the Developers Tool Kit ... if you do a search on:
    categories_image

    you can see all the places referenced and you can check to see if you can just change a simple template or module or perhaps the function for your needs on this ...

    This is pretty specialized as I have not had too many people who need this ...

    You could also customize a simple routine to be run when you update your products to go rebuild the categories table with the correct image from the products table based on the master_categories_id (assuming that is correct) ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Category images from product images
    By korayp in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 22 Dec 2009, 04:12 PM
  2. How do I keep the banner images from resizing automatically?
    By bparker in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 19 Nov 2008, 03:33 AM
  3. Populate Images by Category and Product
    By borillion_star in forum Customization from the Admin
    Replies: 0
    Last Post: 1 Sep 2008, 08:57 PM
  4. Automatically populate sub category images + change attribute ordering
    By GTrotter in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 30 Apr 2007, 07:54 AM

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