Global changes to Attribute price?
I found an old thread where a solution was posted for global changes to attribute image.
Here is the sql patch:
UPDATE products_attributes SET attributes_image = 'attribute_image.jpg' WHERE options_id = XXX and options_values_id = XXX;
What would be the field name used for the attribute price change?
Something like:
UPDATE products_attributes SET attributes_price = 15.00 WHERE options_id = XXX and options_values_id = XXX;
Thank for the help.
Re: Global changes to Attribute price?
The field is called options_values_price .
But what exactly are you trying to do?
You say you are looking to do a GLOBAL update.
If you want to do a GLOBAL update, then you need to establish FIRST, which products have which attributes assigned, and how they are currently priced.
That bit of SQL you mention refers to a SPECIFIC item:
WHERE options_id = XXX and options_values_id = XXX
The XXX will be replaced by the relevant id's.
If you are looking to update MULTIPLE option values, then considerable care is needed
This can be tricky, and I would not advise a novice doing it.
It depends on a few things... do you want to raise prices by a set value - such as by 20%, or does each have a unique value?
Re: Global changes to Attribute price?
Thank you for the response. What I am trying to achieve is the same as the attribute swatch patch but with the attribute price change.
The problem really comes from the fact that I have many products that share the same attributes, but the attribute properties (such as image swatch and prices for individual options) are not transferrable when copying the options from 1 product to another.
I have created an sql patch which will update all the option image swatches after I create/copy now products with their attributes, now I need to do the same for the price changes as well. In the case of the Attribute_image, the field value (image file name) is enclosed in " ", I just need to know if the Option_values_price is of numeric type (00.000) or does it need to be in quotes as well ("00.000")? I would assume it is just standard decimal 00.000 but need it to be sure.
Re: Global changes to Attribute price?
Just FYI, thanks for pointing me in the right direction, I was able to setup the option price change along with the attribute image, now I can update all of my attributes in 1 single sql file any time I add new products.
Re: Global changes to Attribute price?
Hi Michael
It would be great if you could post the sql file or fix for this, I am also trying to update an attribute price for multiple products.
Re: Global changes to Attribute price?
Quote:
Originally Posted by
michaelchu
Just FYI, thanks for pointing me in the right direction, I was able to setup the option price change along with the attribute image, now I can update all of my attributes in 1 single sql file any time I add new products.
Hi, can you please provide the sql file that you used as I"m not very savvy in those things?