Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2011
    Posts
    381
    Plugin Contributions
    0

    Default Global Attribute Price Change

    Hello,

    Is it possible to change the price of an attribute globally?

    I want to change it from 9.99 to 12.99 but i am trying to do it globally as opposed to do each product one by one.

    This attribute is the same on all products and has the same value.

    Option Name is "Please choose a special gift"
    Option Value is "Full size greeting card"

    Current price is set to 9.99 and need to be raise to 12.99

    I tried the solution on this thread: https://www.zen-cart.com/showthread....ts-at-one-time

    It didn't work for me as it seems to raise it by a certain percentage instead of a fixed price.

    Anyone knows how i can achieve this?

    Thank you in advance for your help.

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Global Attribute Price Change

    I have used this in the past, on older versions of ZC - obviously test it yourself.

    In phpmyadmin, or similar, run this SQL command for your options_value_id:

    Code:
    UPDATE products_attributes SET options_values_price='12.99' WHERE options_values_id='???';
    You could use the Install SQL Patches in Admin but with recent versions of phpmyadmin you get to preview the results before committing.
    Simon

  3. #3
    Join Date
    Apr 2011
    Posts
    381
    Plugin Contributions
    0

    Default Re: Global Attribute Price Change

    Quote Originally Posted by simon1066 View Post
    I have used this in the past, on older versions of ZC - obviously test it yourself.

    In phpmyadmin, or similar, run this SQL command for your options_value_id:

    Code:
    UPDATE products_attributes SET options_values_price='12.99' WHERE options_values_id='???';
    You could use the Install SQL Patches in Admin but with recent versions of phpmyadmin you get to preview the results before committing.
    It did the trick without any issue and definitely saving this for future use. Thankyou simon.

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,133
    Plugin Contributions
    11

    Default Re: Global Attribute Price Change

    Just a reminder that, IF you have used a prefix for your tables, you will need to add them to the UPDATE syntax in phpMYAdmin.

    If you made a DB prefix of ZEN_ when you created your site, then;

    Code:
    UPDATE products_attributes SET options_values_price='12.99' WHERE options_values_id='???';
    would need to be the following for phpMyAdmin.
    Code:
    UPDATE ZEN_products_attributes SET options_values_price='12.99' WHERE options_values_id='???';
    Using the Install SQL Patches in your ADMIN will automatically take care of the prefix and simon1066's code will work fine as the system already knows what you selected for the prefix when you installed the site.

  5. #5
    Join Date
    Apr 2011
    Posts
    381
    Plugin Contributions
    0

    Default Re: Global Attribute Price Change

    Thanks dbltoe.

    I personally do not use prefix but that s something to keep in mind if you use the cpanel / phpmyadmin for SQL patches like me. The ADMIN works great too but i like the "simulation" option as pointed out by Simon1066

  6. #6
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Global Attribute Price Change

    Quote Originally Posted by dbltoe View Post
    Just a reminder that, IF you have used a prefix for your tables, you will need to add them to the UPDATE syntax in phpMYAdmin.

    If you made a DB prefix of ZEN_ when you created your site, then;

    Code:
    UPDATE products_attributes SET options_values_price='12.99' WHERE options_values_id='???';
    would need to be the following for phpMyAdmin.
    Code:
    UPDATE ZEN_products_attributes SET options_values_price='12.99' WHERE options_values_id='???';
    Using the Install SQL Patches in your ADMIN will automatically take care of the prefix and simon1066's code will work fine as the system already knows what you selected for the prefix when you installed the site.
    Yes, thanks for that. I should have added the prefix option for completeness.
    Simon

  7. #7
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Global Attribute Price Change

    Quote Originally Posted by nicksab View Post
    Thanks dbltoe.

    I personally do not use prefix but that s something to keep in mind if you use the cpanel / phpmyadmin for SQL patches like me. The ADMIN works great too but i like the "simulation" option as pointed out by Simon1066
    Note that the admin doesn't offer the "simulation" option to prevent ready discovery of database information associated with the data returned when doing so. Put another way, that simulation response data is omitted on purpose and by design.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Global changes to Attribute price?
    By michaelchu in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 18 Dec 2014, 07:44 PM
  2. v139h Global Attribute Price
    By Phil S in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 31 Jan 2013, 05:30 PM
  3. Global price change?
    By Nick Alynn in forum General Questions
    Replies: 52
    Last Post: 14 Dec 2011, 01:19 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR