Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default changing option value flags in bulk?

    We need to alter the attributes on a large quantity of products. Currently the option name "Add" (option ID #22) is set to checkbox and needs to be switched to radio button so customers will be forced to make a selection before they can continue checkout. Once option name "Add" is changed from checkbox to radio button we then add a new option value "Select Quantity" (ID #80) to option name "Add". "Select Quantity" option value can be added to all applicable products using the attributes controller function - Copy to ALL Products where Option Name and Value ....


    The sticking point for me is the new option value "Select Quantity" needs to have these flag settings:

    Used For Display Purposes Only: yes

    Default Attribute to be Marked Selected: yes

    Order: 1

    Now we need to apply these flag settings to all the products that now have the new option value without having to do that product by product with the attribute controller? Is it possible to do this in the database? The option ID (option name) is #22, option value ID is #80 but there are way to many products to easily know which product IDs would be included. There could be around 2000 products with this option ID. Looking in the database, I'm thinking the recipe would include: products_id, options_id, options_values_id, attributes_display_only, attributes_default. If what I'd like to do is possible I don't know if I've identified all the needed fields or how to construct the sql. Any assistance would be really appreciated.
    Last edited by buildingblocks; 15 Jan 2015 at 10:26 PM.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: changing option value flags in bulk?

    If the options_values_id = 80 on all of these that you need the Default and Display only turn on, you could then use in the Tools ... Install SQL Patches:
    Code:
    UPDATE products_attributes SET attributes_default = 1, attributes_display_only = 1 WHERE options_values_id = 80;
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: changing option value flags in bulk?

    Thank you! That worked.......awesome

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: changing option value flags in bulk?

    You are most welcome ... thanks for the update that this was able to work for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. How do I bulk add option values to option names?
    By waterbender in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 1 Jul 2014, 02:42 PM
  2. Adding a newly created Option Name/Value to every option menu
    By tcarden in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 31 Jan 2014, 05:55 AM
  3. enlarge the option name and option value boxes in Attributes
    By stevenlee in forum Customization from the Admin
    Replies: 10
    Last Post: 16 Aug 2008, 02:16 AM
  4. 2nd option value need to be changed by 1st option value
    By userman in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 15 Jan 2008, 03:04 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