Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2011
    Posts
    74
    Plugin Contributions
    0

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

  2. #2
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    9,958
    Plugin Contributions
    3

    Default 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?
    Our latest project is Pet Tags.

  3. #3
    Join Date
    Nov 2011
    Posts
    74
    Plugin Contributions
    0

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

  4. #4
    Join Date
    Nov 2011
    Posts
    74
    Plugin Contributions
    0

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

  5. #5
    Join Date
    Nov 2010
    Posts
    4
    Plugin Contributions
    0

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

 

 

Similar Threads

  1. Global Product Attribute Images?
    By encryptdesigns in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 27 Apr 2010, 01:43 AM
  2. attribute copy to global feature
    By monmouthtaxis in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 23 Feb 2009, 10:26 AM
  3. global attribute choice
    By spencoid in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 16 Mar 2008, 05:48 AM
  4. global attribute image
    By studeo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Jan 2007, 04:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •