Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jul 2005
    Posts
    32
    Plugin Contributions
    0

    Default howto force user to select at least one attribute?

    Hi,

    Iīve realized the tracks for a music album as attribute-checkboxes.

    Works fine...

    The only problem is, that it happens quite a lot of times, that customers donīt realise that they have to check something before they can click the "add to cart"-button...
    => as product is priced by attributes, this adds the name of the album to the shopping cart with 0.00 EUR...
    (perhaps at first the customers are happy about the free product, but after paiement this changes to frustration because there is no download-link ;-)

    The very simplest way is to check a "default attribute", in my example a "default track"... But this is not very useful in general...

    So how can I say "customer has to check at least one of the attributes, before the products is added to the shopping cart" ?

    Any help would be very appreciated...

    Bye
    Sven

  2. #2
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: howto force user to select at least one attribute?

    You could just put a bright red text that says CHECKMARK YOUR SELECTIONS
    Zen cart PCI compliant Hosting

  3. #3
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Re: howto force user to select at least one attribute?

    Make your first value something like "Select from below" and set the Attribute flags as :

    Used ForDisplay Purposes Only: YES
    Default Attribute to be Marked Selected: YES

    If they don't make a choice, they get an error message
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  4. #4
    Join Date
    Apr 2006
    Posts
    136
    Plugin Contributions
    0

    Re: howto force user to select at least one attribute?

    Yaar i have problem here

    http://dev2.alakmalak.com/adoorman/i...&products_id=3


    this is my product info display apge.

    now on bottom side i need diff.image for all 5 radio button ..please can you help me how can i do it..


    please

  5. #5
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Re: howto force user to select at least one attribute?

    Not at the moment - page gives a parse error
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  6. #6
    Join Date
    Jul 2005
    Posts
    32
    Plugin Contributions
    0

    Default Re: howto force user to select at least one attribute?

    thank you ryth,

    for your good proposition...

    But it gives only a warning,
    doesnīt prevent the product from beeing added to the basket ;-(

    Seems like I will have to modify the code again ;-)

    Thank you...
    Sven

  7. #7
    Join Date
    Apr 2006
    Posts
    121
    Plugin Contributions
    0

    Default Re: howto force user to select at least one attribute?

    Svenschaetzl, if you succeed in getting this to work with your code rewrite would you be so kind to share it with us? This is on of the things I'm struggling with at the moment and I lack the knowledge of PHP to do it myself. Thanks in advance.

  8. #8
    Join Date
    Feb 2006
    Posts
    40
    Plugin Contributions
    0

    Default Re: howto force user to select at least one attribute?

    I've got a similar requirement, so I'd be grateful to hear the best solution as well!

    Thanks!

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

    Default Re: howto force user to select at least one attribute?

    A simple method is to make an extra attribute ...

    Option Name: Color
    Option Values:
    Red
    Yellow
    Green
    Select a Color (wording is up to you)

    Set the Select a Color as sort order 0 and set as Default and Display Only when adding it ...

    This makes it the first on the list ... and by default the selected attribute ...

    If the customer tries to add the product with that, it will give an error message to make a proper choice ...
    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!]
    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!

  10. #10
    Join Date
    Feb 2005
    Posts
    104
    Plugin Contributions
    0

    Default Re: howto force user to select at least one attribute?

    This is great advice and worked well for me.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 require at least one checkbox
    By paul3648 in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 4 Feb 2015, 06:23 PM
  2. v151 How to require at least one attribute
    By rich47 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 6 Aug 2013, 03:31 AM
  3. v151 From multiple Option Names and Attributes allow user to select one attribute only
    By tipada in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 27 Jan 2013, 03:10 AM
  4. File Upload Attribute - Force User to Choose one or other
    By breda in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 29 Jul 2010, 04:20 PM
  5. How do I make radio buttons required so that the user must select one?
    By karma-lab in forum Setting Up Categories, Products, Attributes
    Replies: 21
    Last Post: 2 Oct 2008, 11:09 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