Zen Cart Logo
Forums / General Questions / Attributes - Radio buttons

Attributes - Radio buttons

Views: 1,155

Results 1 to 10 of 10
24 Oct 2013, 9:55 PM
#1
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Attributes - Radio buttons

Hello:

Is there a way to basically force the customer to make a choice when you have either two or more radio buttons. The only thing that I can find is in the Attributes Controller in the boxes labeled "Attribute Flags." I can see that you can select one as the default and that this is the one that is already marked for the customer. What if the customer doesn't see that and adds it to the cart? It goes right to the cart and this is where they could just click and go. I am trying to prevent returns here. Is there any way that if a choice isn't made the customer cannot add to the cart? Some kind of pop-up or something?

Example: On this particular product I have Dark Mahogany chosen as the default. I would rather the customer be forced to make the choice before going to the cart.

http://www.petluxuryboutique.com/index.php?main_page=product_info&cPath=1318&products_id=33991

Thanks in advance for your help.

Silver

24 Oct 2013, 9:59 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Attributes - Radio buttons

Usually just add a third Option Value for:
Pick you favorite (or what do you want) (or some text that encourages a selection:
Sort Order 0
Default YES
Display Only YES

Now they have to pick a valid selection to order the Product or else it cannot be added to the cart ...

24 Oct 2013, 10:27 PM
#3
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Attributes - Radio buttons

Ajeh:

I suppose I am doing something wrong. I am still getting the same result?

Silver

24 Oct 2013, 10:34 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Attributes - Radio buttons

Go to your Catalog ... Option Values Manager ...

Add a new Option Value for the:
Option Name: Your Finish
Option Value Name: Pick your Favorite
Default Sort Order: 0

Go to your Catalog ... Product ... and click on the A for Attributes Controller ...

When on this Product, now add the new Option Name/Value

Option Name: Your Finish
Option Value: Pick your Favorite
Sort Order: 0
Default: YES
Display Only: YES

You should now be able to go to the Product in the shop and see the 3 Radio Buttons with the new one for Pick Your Favorite that is selected ...

Try to add the Product to the cart with that new Option Value and you should get a warning saying you have to pick a valid choice ...

16 Nov 2013, 3:21 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Attributes - Radio buttons

lunabug:

I'm having the same problem, might be due to one of the add-ins. What is the file name where I can go see if I over wrote something?

http://www.lunabugsoap.com/index.php?main_page=product_info&cPath=1_66&products_id=190

Thanks,

What do you mean a file to look and tell if you have overwritten something? The only things that come to my mind is to go into the control panel of the host and review the restoration area to see what file(s) are/were new(er) and possibly restore those files. Otherwise download the whole program and use winmerge with my local copy to see what is different.otherwise, what has been changed, has been changed. :/

16 Nov 2013, 3:32 AM
#7
lunabug avatar

lunabug

New Zenner

Join Date:
Dec 2009
Posts:
94
Plugin Contributions:
0

Re: Attributes - Radio buttons

I don't want to have to compare EVERY SINGLE FILE to see what is different from the OOB version. I want to know the file name so I can just compare that file, and I prefer Beyond Compare to Winmerge.

16 Nov 2013, 3:52 AM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Attributes - Radio buttons

lunabug:

I don't want to have to compare EVERY SINGLE FILE to see what is different from the OOB version. I want to know the file name so I can just compare that file, and I prefer Beyond Compare to Winmerge.

That's fine not to want to have to compare all of the files, but there are 2000+ files associated with ZC, when you ask which file to compare, we need to know more about what problem it is that you are trying to get resolved to be able to identify a file. The problem/solution addressed above has nothing to do with a file problem but a database setup issue when looking/considering attributes. The answer provided addresses making selections to force a visitor to pick something other than the default. There is no "file" involved. So please explain further what it is you are trying to resolve that might be file related.

16 Nov 2013, 4:24 AM
#9
lunabug avatar

lunabug

New Zenner

Join Date:
Dec 2009
Posts:
94
Plugin Contributions:
0

Re: Attributes - Radio buttons

As I've 'played' with this further, it works as expected when using a drop down box but NOT when using radio buttons.

mc12345678, go to the link I provided and add it to a cart. There is no warning that I have not selected a scent. This is what I believe is not working as expected. I believe that all the database settings are correct but that maybe there is something not being checked when the system queries the input data, therefore it is not finding fault with the fact there is no scent selected. I thought that maybe one of the files that is running the SQL statement may have been changed by one of the add-ins I installed. I'm just looking for the file that is doing that checking, and believe one of the mods will have a pretty good idea what that file is so I can check it. And if the file has not been changed, I'd like to know what to change so that I get what I'm looking for.

Bottom Line: I want to require my customers to select a scent. I don't want a default as this is just a bad as choosing nothing if it's not what they want.

16 Nov 2013, 4:49 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Attributes - Radio buttons

lunabug:

As I've 'played' with this further, it works as expected when using a drop down box but NOT when using radio buttons.

mc12345678, go to the link I provided and add it to a cart. There is no warning that I have not selected a scent. This is what I believe is not working as expected. I believe that all the database settings are correct but that maybe there is something not being checked when the system queries the input data, therefore it is not finding fault with the fact there is no scent selected. I thought that maybe one of the files that is running the SQL statement may have been changed by one of the add-ins I installed. I'm just looking for the file that is doing that checking, and believe one of the mods will have a pretty good idea what that file is so I can check it. And if the file has not been changed, I'd like to know what to change so that I get what I'm looking for.

Bottom Line: I want to require my customers to select a scent. I don't want a default as this is just a bad as choosing nothing if it's not what they want.

Thank you for that, it makes a lot of sense. So, to "reproduce" what you have, if you do not select the "first" attribute as a default, then yes the customer will be able to add the product without actually making a selection. The default option is the third from the left option in the attributes controller. I see that it is set as read only; however, it does not appear to be set as the default. By having both checked, they will not be able to add the item to the cart until one of the other "active" options is chosen.