Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / why can't I make a radio button mandatory?

why can't I make a radio button mandatory?

Locked

Views: 4,835

Results 1 to 20 of 20
This thread is locked. New replies are disabled.
16 Nov 2008, 5:08 PM
#1
trillian avatar

trillian

Zen Follower

Join Date:
Jun 2005
Location:
London, UK
Posts:
141
Plugin Contributions:
0

why can't I make a radio button mandatory?

I have read a few threads about this and tried everything and just cannot get ths to work.

I have a product that comes in several different variations and only need to select one.

Currently I have one option name and 6 option values in the form of radio buttons.

The problem is a customer can hit 'add to cart' without making a selection, so then we have no
idea what they want.

I can make one of the options mandatory but then that could be worse because if they
don't pay attention to the selection we will end up shipping them the wrong version.

All I need is a setting so that at least one option has to be selected before they can
add to cart.

I thought that's what the red 'required' button did but apparently not.

Nothing I do with the yes/no settings on those buttons will get what I need.

How can I do this ? One would think it should be very simple.

16 Nov 2008, 5:27 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: why can't I make a radio button mandatory?

Add a 7th Option Value for:
Pick one
what do you want
make a selection
Pick the right size
Pick the right color
etc. etc.

Set it as Default YES, Display Only YES and Sort Order 0 ...

Now, they have to pick a valid choice and cannot pick the default choice ... :smile:

16 Nov 2008, 5:44 PM
#3
trillian avatar

trillian

Zen Follower

Join Date:
Jun 2005
Location:
London, UK
Posts:
141
Plugin Contributions:
0

Re: why can't I make a radio button mandatory?

Cool ! It works :)

Many Thanks,
Sheryl

16 Nov 2008, 8:25 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: why can't I make a radio button mandatory?

Thanks for the update that this worked for you ... :smile:

27 Oct 2009, 1:09 PM
#5
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: why can't I make a radio button mandatory?

hi, i have tried this and it didnt work, i susspect it is something i have done wrong tho...

makes no diff when 'required' isselected

what am i doing wrong?

27 Oct 2009, 1:12 PM
#6
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: why can't I make a radio button mandatory?

image for post above

27 Oct 2009, 2:18 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: why can't I make a radio button mandatory?

From the image it looks right but I cannot see anything beyond that from just an image ...

If you switch to the Classic Template, does it work?

If you are using SEO/rewrites turn those off ... does it work?

Do you have some other add ons?

27 Oct 2009, 3:48 PM
#8
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: why can't I make a radio button mandatory?

Hi Ajeh,

thanks for replying, i have a handful of mods, inc the SSU mod. i turned that off and reverted to the default template. still the same...

:(

however i played and noticed that it only doesnt work when a customer is loged in. but works when viewing the site in guest mode..(not logged in)

i guess i might have broken files... which folders/files should i replace with a clean download ... so i can test & report back

27 Oct 2009, 4:00 PM
#9
fez_o_joe avatar

fez_o_joe

Zen Follower

Join Date:
Sep 2009
Location:
California
Posts:
141
Plugin Contributions:
0

Re: why can't I make a radio button mandatory?

Nice answer Ajeh, but I have a quick question to that effect... I'm not a SQL maven, you wouldn't happen to have a quickie to update all the attributes for an option to default (radio button) we have a choice of three, and none - and I like the none having to be the default but didn't know about the 'default', just read it here and we have 100+ products.

Something like 'where attrib = 'venting' and value='none' set default' or ?

Just curious.

27 Oct 2009, 6:14 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: why can't I make a radio button mandatory?

You need to find the options_id and options_values_id in the products_attributes table for the Attribute for None ...

Backup your database ...

UPDATE products_attributes SET attributes_default = 1 WHERE options_id = XX and options_values_id = YY;

where XX is the options_id and YY is the options_values_id ...

27 Oct 2009, 6:15 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: why can't I make a radio button mandatory?

NOTE: you might also set the products_options_sort_order to 0 so it is at the top ... but that can be done in the Catalog ... Option Value Sorter ...

27 Oct 2009, 6:38 PM
#12
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: why can't I make a radio button mandatory?

ajeh... are those last two replies for me?

if so... bit over my head that!

27 Oct 2009, 8:48 PM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: why can't I make a radio button mandatory?

mcshane78:

ajeh... are those last two replies for me?

if so... bit over my head that!

That was for Fez-o Joe on how to update the default Attribute for his products ...

On your issue, it is hard to say from just the image ...

It would be easier to peek at your site ...

27 Oct 2009, 9:30 PM
#14
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: why can't I make a radio button mandatory?

no probs...

hypres.co.uk

this is the product in question.. as you can see there top radio button is working as your instructions.., but when a customer logs in, it stops working :(
hypres.co.uk/gloves/grab-n-grip-gloves

27 Oct 2009, 10:26 PM
#15
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: why can't I make a radio button mandatory?

Afraid I cannot find a way to Create an account so I really could not tell you what is happening ... :blink:

27 Oct 2009, 10:30 PM
#16
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: why can't I make a radio button mandatory?

may i PM you with a test account username and login?

27 Oct 2009, 10:32 PM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: why can't I make a radio button mandatory?

yes, mcshane78 ... you may PM me on this one ... :smile:

27 Oct 2009, 10:50 PM
#18
fez_o_joe avatar

fez_o_joe

Zen Follower

Join Date:
Sep 2009
Location:
California
Posts:
141
Plugin Contributions:
0

Re: why can't I make a radio button mandatory?

Ajeh, thanks - that did it!

28 Oct 2009, 1:17 AM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: why can't I make a radio button mandatory?

You are most welcome, Fez-o Joe ... :smile:

28 Oct 2009, 1:18 AM
#20
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: why can't I make a radio button mandatory?

mcshane78 ... it makes no sense what so ever but after reviewing all files and database tables ... the solution was to delete it from the customer basket on your account ... and bing bang boom! All is right in the world ... :lamo: