Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Sep 2009
    Posts
    48
    Plugin Contributions
    0

    Default Attribute images?

    I have a gazillion colors that I am adding color swatches to, is it possible to have the default option value for that color apply to all products that use that option value? Example: I have a t-shirt that uses the color black, I add that option value to the product, but the swatch does not appear, right now I have to to each product and add the swatch color. Hope that makes sense.

    Terry

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

    Default Re: Attribute images?

    You need to know from the products_attributes table the values of:
    options_id
    options_values_id
    attributes_image

    you can see these if you browse the table:
    products_attributes

    via phpMyAdmin ...

    Then, to make, for example, all Color (options_id 1) Orange (options_values_id 25) with the Attributes image color_orange.gif (attributes/color_orange.gif) you could use:
    Code:
    UPDATE products_attributes SET attributes_image = 'attributes/color_orange.gif' WHERE options_id = 1 and options_values_id = 25;
    in either the SQL of the phpMyAdmin or the Tools ... Install SQL Patches ... of your Zen Cart Admin ...
    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!]
    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
    Sep 2009
    Posts
    48
    Plugin Contributions
    0

    Default Re: Attribute images?

    I am sorry to say that your more than excellent suggestion is far above my understanding of SQL...

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

    Default Re: Attribute images?

    Are you familiar enough with phpMyAdmin that you could find your database and browse the database table products_attributes to look at your Attributes?

    If so, you want to find the contents of the fields:
    options_id
    options_values_id
    attributes_image

    wherre the attributes_image is the correct image that you have already added manually in the Zen Cart Admin with the Attributes Controller to one of your products ...

    The example I showed has the options_id 1 (for Color) and options_values_id 25 (for Orange) and the image file, that I have in the directory /images/attributes/color_orange.gif

    that in the database is stored as:
    attributes/color_orange.gif
    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!]
    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
    Sep 2009
    Posts
    48
    Plugin Contributions
    0

    Default Re: Attribute images?

    Oh great and wise one! I found the attributes you spoke of, so here is what I found:

    Gildan 5000 tshirt, the ash attribute id is 83313
    Gildan 2000 tshirt, the ash attribute id is 83654

    What am I doing wrong? Shouldn't the colors attributes be the same for Ash?

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

    Default Re: Attribute images?

    You need to be more specific ...

    The products_attributes table has fields:
    options_id
    options_values_id
    attributes_image

    You need to see if these are, or should, be the same on each product when they appear together ...

    Example:
    options_id 1
    options_values_id 25
    attributes_image attributes/color_orange.gif

    Should all of those be the same when options_id is 1 and options_values_id is 25 and you want an image for that Attribute?
    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!]
    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!

  7. #7
    Join Date
    Sep 2009
    Posts
    48
    Plugin Contributions
    0

    Default Re: Attribute images?

    There's that whole "be specific thing" lol...
    Ok.. here is what I found for the color of ash

    Gildan 2000 Shirt
    Product Attribute id = 83654
    Prod Id = 26
    Options ID = 1
    Options Value ID = 13

    Gildan 5000 shirt
    Product Attribute id = 83655
    Prod Id = 27
    Options ID = 1
    Options Value ID = 13

    Attributes_images = ash.gif for both shirts

    So whenever I have a product that uses that color the attribute image is placed on the page, hope that makes sense? So when I apply the colors to a product, that color/attribute image then displays on the web page automatically.

    Hope that is what you are asking for...

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

    Default Re: Attribute images?

    To set all images on the attribute to ash.gif (where ash.gif is in the /images directory) for Options ID 1 and Options Values ID 13 you can use:
    Code:
    UPDATE products_attributes SET attributes_image = 'ash.gif' WHERE options_id = 1 and options_values_id = 13;
    This can be run in the Tools ... Install SQL Patches ... of your Zen Cart Admin ... or in the phpMyAdmin SQL ...

    NOTE: Backup before you try to do this ...
    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!]
    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!

  9. #9
    Join Date
    Sep 2009
    Posts
    48
    Plugin Contributions
    0

    Default Re: Attribute images?

    I am guessing that I would have to do that for all the colors? do I just take the text you sent me and make a .txt file to run in the ZC to run the script?

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

    Default Re: Attribute images?

    I would end it in .sql so there is no confusion ...

    Make sure that each statement ends in a semi-colon as I wrote this one ...

    That will allow you to update them any time you need to ...
    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!]
    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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Attribute Images & Additional Images Replace Main Image Onclick w/ Zoom
    By rbarbour in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 1 Mar 2013, 10:46 PM
  2. v150 Attribute images not in-line with attribute selection
    By JacobBushnell in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Aug 2012, 11:51 PM
  3. Popup for both product images and attribute images
    By Fubarsmithuk in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Jan 2011, 03:15 PM
  4. Attribute images and/or attribute pricing
    By tryphon in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 6 Apr 2009, 09:38 PM
  5. Switching Attribute Images as Attribute Changes
    By standnbang in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 4 Feb 2009, 11:48 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