Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2010
    Posts
    24
    Plugin Contributions
    0

    Default How do I set a compulsory option?

    I have a product that has an option, let's say the option is "size". Buyers must select a "size" but i do not want to set a default as it may result in the order being placed with the wrong size.

    How can I make it compulsory for the byer to select one of the options under "size"?

  2. #2
    Join Date
    Jan 2004
    Posts
    63,693
    Blog Entries
    5
    Plugin Contributions
    184

    Default Re: How do I set a compulsory option?

    Create an Option Value named "Please Choose..."
    Click the "Display Only" setting for it,
    and also the "Default" setting.

    That way it will be auto-selected by default, and if someone adds it to their cart with that default "display only" choice selected, they will be given an error message which tells them they still need to select an appropriate choice.

    Works best with Dropdowns.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Oct 2010
    Posts
    24
    Plugin Contributions
    0

    Default Re: How do I set a compulsory option?

    Quote Originally Posted by DrByte View Post
    Create an Option Value named "Please Choose..."
    Click the "Display Only" setting for it,
    and also the "Default" setting.

    That way it will be auto-selected by default, and if someone adds it to their cart with that default "display only" choice selected, they will be given an error message which tells them they still need to select an appropriate choice.

    Works best with Dropdowns.
    Brilliant...works perfectly...thanks.

 

 

Similar Threads

  1. v154 Need to know how to set a default shipping option
    By DivaVocals in forum Built-in Shipping and Payment Modules
    Replies: 20
    Last Post: 16 Feb 2015, 06:03 PM
  2. How to force an option with 1 value? ie. compulsory
    By tcarden in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 10 Jan 2013, 04:56 AM
  3. v150 Second set of option values dependent/based on first option selected
    By Yellowstone in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 27 Aug 2012, 04:28 PM
  4. How do I make Address line 2 compulsory in the create account form?
    By Liamv in forum Customization from the Admin
    Replies: 3
    Last Post: 3 Mar 2010, 09:12 PM
  5. How to set option value with a set image as default of an attribute?
    By PaulRiedel in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 16 Aug 2007, 04:21 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