Forums / Setting Up Categories, Products, Attributes / Update Attribute on All Product, Without Messing up with other attribute in product?

Update Attribute on All Product, Without Messing up with other attribute in product?

Views: 1,222

Results 1 to 11 of 11
8 Sep 2012, 12:36 AM
#1
vilvas avatar

vilvas

New Zenner

Join Date:
Sep 2012
Posts:
11
Plugin Contributions:
0

Update Attribute on All Product, Without Messing up with other attribute in product?

I have a problem, where i would like to add one update to all of my product attribute whiteout changing any other attribute. example:

All my Product have this attributes:

ColorBlack

Sizes52- 16- 140

Lens TypeBifocal (With Line)
Progressive Lens (No Line)
Single Vision (Far/Close-up)

Change to:

ColorBlack

Sizes52- 16- 140

Lens TypeBifocal (With Line) $49.99
Progressive Lens (No Line) $89.99
Single Vision (Far/Close-up) 99.99

without changing the Size of all product and color.

How is this possible?

9 Sep 2012, 1:48 AM
#2
vilvas avatar

vilvas

New Zenner

Join Date:
Sep 2012
Posts:
11
Plugin Contributions:
0

Re: Update Attribute on All Product, Without Messing up with other attribute in product?

I would like to update pricing on one attribute for all my product, without touching other attribute setting of all product . for example, if you follow this URL, you can see Lens type (attribute) don't have price
http://observevision.com/index.php?main_page=product_info&cPath=6&products_id=8
but if you follow this link the lens type have Price right by it.
http://observevision.com/index.php?main_page=product_info&cPath=6&products_id=4

my problem is i wanna put price on "lense Type" attribute without changing Sizes, Colors, or any other attribute of the product.

i know i can do this if i go and add it to the each product manually, but i was wondering if there is a way i can do this faster?

9 Sep 2012, 1:40 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Update Attribute on All Product, Without Messing up with other attribute in product?

Are you trying to change ALL Products that have the Attributes:

Lens TypeBifocal (With Line)

to ALL be:

Lens TypeBifocal (With Line) $49.99

on every product in your shop if they already have the attributes:

Lens TypeBifocal (With Line)

and then ...
change ALL Products that have the Attributes:

Progressive Lens (No Line)

to ALL be:

Progressive Lens (No Line) $89.99

on every product in your shop if they already have the attributes:

Progressive Lens (No Line)

and then ...
change ALL Products that have the Attributes:

Single Vision (Far/Close-up)

to ALL be:

Single Vision (Far/Close-up) 99.99

on every product in your shop if they already have the attributes:

Single Vision (Far/Close-up)

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 Sep 2012, 4:26 PM
#4
vilvas avatar

vilvas

New Zenner

Join Date:
Sep 2012
Posts:
11
Plugin Contributions:
0

Re: Update Attribute on All Product, Without Messing up with other attribute in product?

Yes, how is it possible?

9 Sep 2012, 4:29 PM
#5
vilvas avatar

vilvas

New Zenner

Join Date:
Sep 2012
Posts:
11
Plugin Contributions:
0

Re: Update Attribute on All Product, Without Messing up with other attribute in product?

And i don't want any other attribute to be effected of all product.

9 Sep 2012, 5:08 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Update Attribute on All Product, Without Messing up with other attribute in product?

To replace an Attribute Price, which is the options_values_price, for a specific Attribute on ALL Products regardless of the original Price of the options_values_price ...

You need to find the:
options_id

for the Option Name Lens Type ...

You need to find the:
options_values_id

for the Option Values:
Bifocal (With Line)
Progressive Lens (No Line)
Single Vision (Far/Close-up)

Backup your database ...

Did you backup your database? (very important step)

Then you can use this in the Tools ... Install SQL Patches ...

For the Bifocal (With Line) you can run, by replacing the options_id=1 with your options_id for Lens Type and the options_values_id=16 with the options_values_id for the Bifocal (With Line) use:

UPDATE products_attributes SET price_prefix='+', options_values_price = 49.99 WHERE options_id= 1 and options_values_id = 16;

For the Progressive Lens (No Line) you can run, by replacing the options_id=1 with your options_id for Lens Type and the options_values_id=17 with the options_values_id for the Progressive Lens (No Line) use:

UPDATE products_attributes SET price_prefix='+', options_values_price = 89.99 WHERE options_id= 1 and options_values_id = 17;

For the Single Vision (Far/Close-up) you can run, by replacing the options_id=1 with your options_id for Lens Type and the options_values_id=26 with the options_values_id for the Single Vision (Far/Close-up) use:

UPDATE products_attributes SET price_prefix='+', options_values_price = 99.99 WHERE options_id= 1 and options_values_id = 26;

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 Sep 2012, 7:34 PM
#7
vilvas avatar

vilvas

New Zenner

Join Date:
Sep 2012
Posts:
11
Plugin Contributions:
0

Re: Update Attribute on All Product, Without Messing up with other attribute in product?

Where can i get the options_id=1, and options_values_id=16 for example. I check my phpmyadmin but i dont see lenses type.

9 Sep 2012, 7:49 PM
#8
vilvas avatar

vilvas

New Zenner

Join Date:
Sep 2012
Posts:
11
Plugin Contributions:
0

Re: Update Attribute on All Product, Without Messing up with other attribute in product?

for example this is what type in

UPDATE products_attributes SET price_prefix='+', options_values_price = 49.99 WHERE products_options= 4 and products_options_values = 124;

9 Sep 2012, 10:12 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Update Attribute on All Product, Without Messing up with other attribute in product?

In your Zen Cart Admin in the Catalog ... Option Name Manager ... the ID next to the Lens Type is the options_id ...

In your Zen Cart Admin in the Catalog ... Option Value Manager ... the ID next to the:
Bifocal (With Line)
Progressive Lens (No Line)
Single Vision (Far/Close-up)

are the options_values_id ... that you are looking for ...

WARNING: you need to use the code that I gave you ... if the Lens Type ID is 4 and the is Bifocal (With Line) ID is 124, then you need to use:

UPDATE products_attributes SET price_prefix='+', options_values_price = 49.99 WHERE options_id= 4 and options_values_id = 124;

NOTE: Again, be sure to backup your database before attempting 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!

10 Sep 2012, 11:05 PM
#10
vilvas avatar

vilvas

New Zenner

Join Date:
Sep 2012
Posts:
11
Plugin Contributions:
0

Re: Update Attribute on All Product, Without Messing up with other attribute in product?

Thank you for all your help, now i have one more question how can i make everything in order? for example i want my attribute to shoe in order for all products, now is a mess. I want to be order for all product, like in this order

Color & Size Section:
1 (color)
2 (Sizes)

Lenses Section:
1 (Lens Type)
2 (Right (OD) - Sphere, Right (OD) - Cylinder, Right (OD) - Axis, Left (OS) - Sphere, Left (OS) - Cylinder, Left (OS) - Axis, PD)
3 (Lens Thickness)

and is it possible to write short description on top of each section?

10 Sep 2012, 11:38 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: Update Attribute on All Product, Without Messing up with other attribute in product?

The quick way is to go to the:

Catalog ... Option Name Sorter ... if you need to change the Sort Order of the Option Names ...

Catalog ... Option Value Sorter ... if you need to change the Sort Order of the Option Values ... then once all are set for the Defaults you can run the:

Update All Products' Attribute Sort Orders
to match Option Value Default Sort Orders:

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!