Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default Adding a newly created Option Name/Value to every option menu

    Can someone please explain how to do this:

    I've create an option name 'Please Select' and value 'n/a' and want to add to every single product option pull-down menu in the store. Reason being, I have front end code that alerts the user he/she must make a selection before putting the item into their cart.

    what is the best way to achieve this?, hopefully quickly

    big thanks in advance,

  2. #2
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Adding a newly created Option Name/Value to every option menu

    You'll need an SQL statement that adds the new value to every product, are you using attributes also?
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

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

    Default Re: Adding a newly created Option Name/Value to every option menu

    Do all of these Products already have a set of Option Name and Option Values set?
    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!

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

    Default Re: Adding a newly created Option Name/Value to every option menu

    You are not quite using this feature correctly ... it is already built in for you on the Attributes ...

    What you really want to do to create a forced Option Name/Option Value selection is add your Option Name in the group that you want to force a proper selection the Option Value: Please Select to that Option Name and make it the DEFAULT and set it to DISPLAY ONLY ...

    To do this after you added your Attributes, there is a built in feature to add another Option Value to the existing Option Name ...

    After you have added Option Names/Values to your Products such as Option Name: Color and Option Value: Red, Yellow and Green ... you could then add to all Products that have Option Name: Color the Option Value for: Please Select

    To do this, if you go to the Catalog ... Option Values Manager ... you will see at the bottom of the screen a section headed with the examples:
    Copy Option Name/Value to Products with existing Option Name ...
    Select an Option Name and Value that currently exists on a product or products to add to all products or to only the products in the selected category that have the selected Option Name.
    Example: Add Option Name: Color Option Value: Red to all Products with Option Name: Size
    Example: Add Option Name: Color Option Value: Green with default values from Products ID: 34 to all Products with Option Name: Size
    Example: Add Option Name: Color Option Value: Green with default values from Products ID: 34 to all Products with Option Name: Size for Categories ID: 65
    If you pick your Option Name from the dropdown, then the Option Value that matches it for the Please Select

    In this example, you would pick the Option Name: Color and the Option Value: Please Select [COLOR] ... in the middle box set Option Name to add to: Color ...

    If you want that to all Products that use Option Name: Color just click the INSERT button ...

    Next, you need to provide the Option Name value id and the Option Value value id and we can set the defaults for the DEFAULT and DISPLAY ONLY ...
    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!

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

    Default Re: Adding a newly created Option Name/Value to every option menu

    To set the defaults, say you had the Option Name: Color and its options_id is 1 and your Option Value for the Please Select using the options_values_id is 27 ...

    You could update the settings for all of the DEFAULT and DISPLAY ONLY using the SQL code:
    Code:
    UPDATE  products_attributes SET attributes_default = 1, attributes_display_only = 1 WHERE options_id = 1 and options_values_id = 27;
    in the Tools ... Install SQL Patches ...
    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!

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

    Default Re: Adding a newly created Option Name/Value to every option menu

    NOTE: if you want an Option Value like this on ALL of your Option Name/Value groups, you need to add an Option Value for: Please Select to each Option Name that you want this to appear ...

    So if you want the Option Name Color to have an Option Value: Please Select and the Option Name: Size to have an Option Value: Please Select you will need to add one to both ...

    Then, follow the same concept as posted above to add the Option Values to all Products that use those Option Names and set the DEFAULT and DISPLAY ONLY settings for them as outlined ...
    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!

  7. #7
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default Re: Adding a newly created Option Name/Value to every option menu

    great, big thanks for the help.

 

 

Similar Threads

  1. v155 Copy Option value from one Option name to another - Failing
    By Kcin in forum General Questions
    Replies: 7
    Last Post: 7 Aug 2016, 12:54 AM
  2. Text Option Value in Drop Down Or Radio Option Name
    By DVDTitan in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 17 Nov 2010, 01:06 PM
  3. Replies: 0
    Last Post: 8 Nov 2009, 07:48 AM
  4. Unable to add/edit value after an option name created
    By gamenano in forum General Questions
    Replies: 2
    Last Post: 6 May 2009, 11:38 PM
  5. 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

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