Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Selecting only one option value among multiple options

Selecting only one option value among multiple options

Locked

Views: 1,571

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
20 Aug 2008, 3:04 PM
#1
scottkct avatar

scottkct

New Zenner

Join Date:
Sep 2004
Posts:
4
Plugin Contributions:
0

Selecting only one option value among multiple options

I'm using radios to display all my options and option values (shirt color and color sizes).

I've arranged my options by shirt color and option values by size.

The problem I'm running in to is that the radio groups obviously group by shirt color. This would allow someone to select one size from one color and another from size from another color.

I'm thinking I may have to insert jscript to clear selected radio from one group when a radio is selected in another group. I've found a script that will do this for static groups (where group names are written into the script) but my shirt color options are dynamic.

Any ideas?

Attached is a screen of my template.

20 Aug 2008, 4:20 PM
#2
scottkct avatar

scottkct

New Zenner

Join Date:
Sep 2004
Posts:
4
Plugin Contributions:
0

Re: Selecting only one option value among multiple options

I figured it out. I added the following into where the input tag is built (attributes.php) so that every input includes this:

onClick="javascript:document.cart_quantity.reset();return checked=true"

What is does is when a radio button is selected, it clears the form (all other radio buttons), then returns "checked=true". With out checked=true, selecting the radio button clears the one your clicking.

This may create problems if you have other options in your form. My cart is vary basic when it comes to options, I'll always only have color and color sizes for all my products.