Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / I want to update an attribute on multiple products

I want to update an attribute on multiple products

Views: 1,122

Results 1 to 8 of 8
1 Aug 2012, 1:41 PM
#1
mcgill avatar

mcgill

Zen Follower

Join Date:
Aug 2005
Posts:
101
Plugin Contributions:
0

I want to update an attribute on multiple products

To save me having to manually change an attribute on 300+ ads can anybody tell me how i can just update a single attribute on all ads. I have tshirts and I want to charge £1.50 fr XXl sizes. Now all the t shirts have differing attributes including size variations thats why I want to update a single attribute. Does that makes sense?

1 Aug 2012, 5:18 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: I want to update an attribute on multiple products

For this Attribute, what are the:
options_id
options_values_id

and you want ALL products_attributes that are using these values to be set to:
1.50

correct?

2 Aug 2012, 8:31 AM
#3
mcgill avatar

mcgill

Zen Follower

Join Date:
Aug 2005
Posts:
101
Plugin Contributions:
0

Re: I want to update an attribute on multiple products

Size
xl

yes

2 Aug 2012, 1:51 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: I want to update an attribute on multiple products

Go to the Option Name Manager ... what is the value for the ID on: Size

Go to the Option Value Manager ... what is the value for the ID on: xl

7 Aug 2012, 5:48 PM
#5
mcgill avatar

mcgill

Zen Follower

Join Date:
Aug 2005
Posts:
101
Plugin Contributions:
0

Re: I want to update an attribute on multiple products

1

&

8

7 Aug 2012, 6:30 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: I want to update an attribute on multiple products

Assuming you mean that the options_id is 1 and the options_values_id is 8 ...

You could use:

UPDATE products_attributes SET options_values_price = 1.50 WHERE options_id = 1 and options_values_id = 8;

NOTE: backup your database before making changes like this ...

2 Aug 2013, 4:08 AM
#7
sjrily avatar

sjrily

New Zenner

Join Date:
Mar 2011
Posts:
14
Plugin Contributions:
0

Re: I want to update an attribute on multiple products

Ajeh:

Assuming you mean that the options_id is 1 and the options_values_id is 8 ...

You could use:

UPDATE products_attributes SET options_values_price = 1.50 WHERE options_id = 1 and options_values_id = 8;

> 
> NOTE: backup your database before making changes like this ...

Thank you, Ajeh! Just what I was looking for!! :D
2 Aug 2013, 1:13 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: I want to update an attribute on multiple products

Thanks for the update that this worked for you ... :smile: