Is there a way to add a price to an entire attribue instead of going through each value and changing it there?
Is there a way to add a price to an entire attribue instead of going through each value and changing it there?
If you have assigned the attribute to ALL the products to which it applies, then you could probably run a SQL UPDATE command via the Install SQL Patches under the tools menu.
By FIRST assigning the attribute to ALL relevant products, you create its presence in the products_attributes table, because without it being present in the table, it will not be able to do the price update.
UPDATE `products_attributes` SET `options_values_price` = '20.0000' WHERE `options_values_id` =XXX;
What this says above is this:
Go into the products_attributes table and then SET the price of every option value (with the ID of XXX) to 20.0000.
SO... if you determine that the option_values_id is 3, and you want to assign a value of 20 pounds/dollars/sheckles/clams/glassbeads to that option value...
UPDATE `products_attributes` SET `options_values_price` = '20.0000' WHERE `options_values_id` =3;
-----------------------------------
DISCLAIMER:
Do this at your own risk. BACKUP your dbase before you run SQL scripts - even mine...
20 years a Zencart User
Okay so I for my Colors Attribute it has an ID of 1 and I want all the products in the colors attribute to have a price of 4.40 so I would do something like...
UPDATE `products_attributes` SET `options_values_price` = '4.40' WHERE `options_values_id` =1;
There are option NAME ID's and option VALUES ID's.
Make sure you select the option VALUE ID.
20 years a Zencart User