Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Mass Uploading Images for Attributes

Mass Uploading Images for Attributes

Locked

Views: 1,553

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
25 Aug 2008, 10:01 AM
#1
laurenh2201 avatar

laurenh2201

New Zenner

Join Date:
Aug 2008
Location:
Edinburgh
Posts:
26
Plugin Contributions:
0

Mass Uploading Images for Attributes

Hello!

Is there any way to sort of, mass upload attribute images and have them automatically know which attribute to associate themselves with? Or is this just wishful thinking? >.>

We sell paint and pencils etc, and as you can image, there's hundreds of freaking different colours. >.<

Thanks for any help. :)

26 Aug 2008, 6:02 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mass Uploading Images for Attributes

If you were to say, for example:
Option Name Color (options_id 1) and Options Value Red (options_values_id 16) would that always be the same image name?

26 Aug 2008, 10:56 PM
#3
laurenh2201 avatar

laurenh2201

New Zenner

Join Date:
Aug 2008
Location:
Edinburgh
Posts:
26
Plugin Contributions:
0

Re: Mass Uploading Images for Attributes

Ajeh:

If you were to say, for example:
Option Name Color (options_id 1) and Options Value Red (options_values_id 16) would that always be the same image name?

Mmmm. I think not. But it could be.

ie. Instead of "Colour: Red, White, Green." I'd just change to, "Pastel Colour: Red, White, Green." and "Pencil Colour: Red, White, Green." etc. in which case every Pencil Colour: Red would be the same image.

What do you think?

27 Aug 2008, 5:32 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mass Uploading Images for Attributes

I was trying to find a pattern to the Option Name and Option Value so that if the same they could then have the images updated easily with the values being the two fields that could be tested for on updating the image names ...

27 Aug 2008, 8:58 AM
#5
laurenh2201 avatar

laurenh2201

New Zenner

Join Date:
Aug 2008
Location:
Edinburgh
Posts:
26
Plugin Contributions:
0

Re: Mass Uploading Images for Attributes

I think I get what you mean...

I don't know if the ID tag would be much use, as it's kind of a mess - does zen-cart work with the actual name of the Option Value/Name in any way?

I really haven't seen any kind of php or css or anything before a week or so ago, so doing my best to interpret what I've seen so far. <.< >.>

27 Aug 2008, 3:33 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mass Uploading Images for Attributes

The text on the Option Name ID and Option Value ID is not really relevant ... it is the value that means anything ...

If the values were known and all options_id ## and options_values_id ## had the same image, then something could be made to speed up adding the images if they were always the same for each pair ...

Otherwise, you are back to one by one ...

28 Aug 2008, 9:11 AM
#7
laurenh2201 avatar

laurenh2201

New Zenner

Join Date:
Aug 2008
Location:
Edinburgh
Posts:
26
Plugin Contributions:
0

Re: Mass Uploading Images for Attributes

Ajeh:

If the values were known and all options_id ## and options_values_id ## had the same image, then something could be made to speed up adding the images if they were always the same for each pair ...

Okay, that can be done. I think the extra effort made into worrying about IDs would be a lot less than one by one anyway.

How were you thinking we could do this?

28 Aug 2008, 2:30 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mass Uploading Images for Attributes

An example would be for the demo data to set all attributes that use the Option Name Color (options_id 1) and Options Value Orange (options_value_id 25) to use the image color_orange.jpg in the /images/attributes directory:

UPDATE products_attributes SET attributes_image = 'attributes/color_orange.jpg' WHERE options_id = 1 and options_values_id = 25;