If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Categories, Products, Attributes / I want to update an attribute on multiple products

I want to update an attribute on multiple products

Started by mcgill on 1 Aug 2012, 1:41 PM · Views: 1,123

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?

Only a fool say's money doesn't matter. No rich man ever starved to death.

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?

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!

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

Only a fool say's money doesn't matter. No rich man ever starved to death.

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

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 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

Only a fool say's money doesn't matter. No rich man ever starved to death.

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 ...

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!

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:

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!