Thread: Attributes

Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Nov 2011
    Posts
    80
    Plugin Contributions
    0

    Default Attributes

    Is there a way to add a price to an entire attribue instead of going through each value and changing it there?

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: Attributes

    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

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

    Default Re: Attributes

    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;

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: Attributes

    There are option NAME ID's and option VALUES ID's.

    Make sure you select the option VALUE ID.
    20 years a Zencart User

 

 

Similar Threads

  1. Default Attributes for Category or Add Attributes when Creating Products
    By vegascoug in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 17 Sep 2009, 12:03 AM
  2. Sub-Attributes possible? aka Top-tier attributes determine lower-tier attributes?
    By JOVE in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 8 Jul 2008, 08:47 PM
  3. Copy Product without attributes still copies the attributes
    By oavs in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 29 Apr 2008, 11:30 PM
  4. Sub-attributes? Making attributes of attributes appear based on which you select?
    By pioupioun in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Jun 2006, 11:34 PM

Posting Permissions

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