Results 1 to 7 of 7

Hybrid View

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

    Default attributes force selection

    First, I have searched and read for how to force a selection. But it doesn't seem to address what I am trying to do.

    I have some figurines I am selling priced by attributes. The figurines are separated into series by option names using checkboxes.
    Is there a way to force the selection of at least one attribute without having to assign a read only default value to each option name? If I do that then one item from each series has to be selected.

    This is how they are set up at the moment.

    http://booksandunusuals.com/miscella.../wade-whimsies

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: attributes force selection

    If you want to allow more than one to be selected at a time, then you will need to leave it as is. The "force at least one checkbox" issue is a generic web issue which you could google to see if there are practical solutions.

    If you want only one selected, you could make them radiobuttons; they would have to be in one option name group. Flexible Attributes in Free Addons may be able to help you get the layout you want, with grouping.

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

    Default Re: attributes force selection

    Thanks for responding.

    That's what I was afraid of. I want to keep them separated (at least visually) into series. The only other way I could do it then is to monkey it and group them all under one option name then create separator values with value named as the series. Once that's done I can hide the checkbox/input field by ID. I partially tested that and it looks like it may work ok that way but I wanted to see if there is a right way before I do it.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: attributes force selection

    You can't use checkboxes and force a selection, at least not without adding custom coding. If you want checkboxes, there is no point in changing your setup. If you want radiobuttons, your approach would work.

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

    Default Re: attributes force selection

    Quote Originally Posted by gjh42 View Post
    You can't use checkboxes and force a selection
    aahhhh, that I did not know. Thanks for mentioning it. That saves me the long route of finding it out myself.

    I'll leave it be and move on to something else.

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

    Default Re: attributes force selection

    Checkboxes (in any form submission) are for MULTIPLE values:

    They allow a user to choose "A" and "B" and "C"... or "A" and "C"... or "B" and "C"... (etc).

    ... so you cannot FORCE a single selection with checkboxes.

    You can only force selections where there are several values, but only one can be selected - and this then applies to dropdowns and radio buttons.

    To FORCE a selection, one creates a "DISPLAY ONLY" OPTION VALUE in any given dropdown/radio-button value set. You make this the DEFAULT value, and it is also a good idea to give it the lowest sort-order number, so it appears FIRST in the list.

    If the visitor fails to make a selection, they cannot proceed to add-to-cart, and an alert message shows, telling them they MUST make a choice in these options, before a product can be added to the cart.

    EG:

    Option NAME = "Shirt Colour"

    Option VALUES for "Shirt Colour" :-

    (Sort order 1) Please make a selection... (Display Only and Default option)
    (Sort order 2) Red
    (Sort order 3) Green
    (Sort order 4) Blue
    20 years a Zencart User

 

 

Similar Threads

  1. Force Template Selection
    By philip937 in forum General Questions
    Replies: 2
    Last Post: 30 Aug 2011, 08:37 AM
  2. Force attribute selection?
    By jenpen in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 28 Jan 2011, 12:18 AM
  3. Force Attribute Selection
    By michellepchy in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 5 Aug 2010, 09:16 PM
  4. Force Selection of an Attribute
    By FoodDudes in forum General Questions
    Replies: 1
    Last Post: 22 Feb 2009, 03:53 AM
  5. Force Selection of Attributes? & a way to position them better?
    By brian02138 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 17 Jan 2008, 07:10 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