Forums / Setting Up Categories, Products, Attributes / attribute radio boxes set is stuck all selected on

attribute radio boxes set is stuck all selected on

Started by hareslade on 19 Aug 2013, 1:43 PM · Views: 984

Results 1 to 11 of 11
19 Aug 2013, 1:43 PM
#1
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

attribute radio boxes set is stuck all selected on

Hi, I have created a set of attribute radio boxes for a product, intending a simple one colour selection from a list.

only one colour is set as 'selected', in the attributes manager itself.

BUT.. they are all 'on' selected on the product display, and I can see the reason is ..the code name of each button is different,
.
What did I do wrong?
The zencart code is adding the 'id' number of each option name shown in the attributes, e,g name="id[2]"
where the id of the attribute name is 2.

but i can't create a set of attribute names with the same name id number [obviously?]

so is this a bug, or am I not creating a set of radio buttons properly in the attributes names / values?

code on the product page is.. [note i don't display the attribute name text]

<div class="wrapperAttribsOptions"> <!-- h4 class="optionName back" --><!-- /h4 --> <div class="back"><input type="radio" name="id[2]" value="2" checked="checked" id="attrib-2-2" /><label class="attribsRadioButton zero" for="attrib-2-2">Blue</label><br /> </div> <br class="clearBoth" /> </div> <!-- br class="clearBoth" / --> <div class="wrapperAttribsOptions"> <!-- h4 class="optionName back" --><!-- /h4 --> <div class="back"><input type="radio" name="id[8]" value="8" checked="checked" id="attrib-8-8" /><label class="attribsRadioButton zero" for="attrib-8-8">Green</label><br /> </div> <br class="clearBoth" /> </div> <!-- br class="clearBoth" / --> <div class="wrapperAttribsOptions"> <!-- h4 class="optionName back" --><!-- /h4 --> <div class="back"><input type="radio" name="id[6]" value="4" checked="checked" id="attrib-6-4" /><label class="attribsRadioButton zero" for="attrib-6-4">Brown</label><br /> </div> <br class="clearBoth" /> </div> .
19 Aug 2013, 2:07 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: attribute radio boxes set is stuck all selected on

Sounds like you have 1 Option Name with 1 Option Value rather than 1 Option Name with multiple Option Values ...

Example. you should have something like the Option Name:
Color

and for that 1 Option Name of Color, you should have multiple Option Values so you would be using:
Option Name: Color (option_id 2)
Option Value Name: Red (option_value_id 10)

Option Name: Color (option_id 2)
Option Value Name: Yellow (option_value_id 20)

Option Name: Color (option_id 2)
Option Value Name: Green (option_value_id 30)

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!

19 Aug 2013, 3:22 PM
#3
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: attribute radio boxes set is stuck all selected on

Thanks ajeh

but I still can't see how to 'force' the same option name to have multiple values,

I have this 'Colour 1' for option name, I thought it would work but it doesn't combine the radio boxes..

1 Colour 1 Black 0 Update Delete
2 Colour 1 Blue 0 Update Delete
4 Colour 1 Brown 0 Update Delete
8 Colour 1 Green 0 Update Delete
7 Colour 1 Navy 0 Update Delete
6 Colour 1 Red 0 Update Delete
5 Colour 1 White (normal) 0 Update Delete
3 Colour 1 Yellow

19 Aug 2013, 3:28 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: attribute radio boxes set is stuck all selected on

Could you go to phpMyAdmin for your database on this site and look in your database for the table:
products_options

and sort on the field for:
products_options_name

are you able to do a screen shot of what you see and post it here?

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!

19 Aug 2013, 3:35 PM
#5
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: attribute radio boxes set is stuck all selected on

hi..also I notice in the actual product's attributes page, the Colour 1 's are listed but I only can select one item from the list at a time to add/insert, I don't get multiple selection.

will do as you suggest.

19 Aug 2013, 3:49 PM
#6
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: attribute radio boxes set is stuck all selected on

as requested, image of products_options table attached i hope,
all the rows have identical Colour 1 name, sorry its hard to read

19 Aug 2013, 4:05 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: attribute radio boxes set is stuck all selected on

I does look like you have made multiple Option Names for Colour 1 ...

Unless you are trying to have multiple Option Names for Colour 1 ... you should just have the 1 Option Name ...

Currently, how many Products have the Attributes setup to use Color 1?

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!

19 Aug 2013, 4:25 PM
#8
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: attribute radio boxes set is stuck all selected on

its a test site, only one product has any attributes, i.e Colour 1.

I'll try another attributes name and product ? maybe its just a glitch on this specific setup.

19 Aug 2013, 5:00 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: attribute radio boxes set is stuck all selected on

Go to the Attributes Controller for that Product and Delete all of the Attributes that reference anything about Colour 1 ...

Next, Go to the Catalog ... Option Name Manager ...

Delete all Option Names for Colour 1 except the one that is ID 1 ... You should see comments about the Option Name being safe to delete and that any associated Option Value Names will also be deleted ... that is fine ...

Once you have things cleaned up, you should see in the Catalog ... Option Name Manager ... that you have just have the 1 Option Name for Colour 1 ...

Now, go to the Option Value Manager ...

You want all of your colors to now be added to your Option Name for: Colour 1

Once this is done, go to the Attributes Controller for that Product and you should click on the Option Name for Colour 1 and see all your colors in the list for the Option Values ...

Now, add all of the Attributes for your Colour 1 that you need ...

Next, go to your Catalog and look at this Product and you should see that all of the Colour 1 are Radiobuttons and that you can now click through them and just have 1 of the Radiobuttons highlighted at a time ...

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!

19 Aug 2013, 9:01 PM
#10
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: attribute radio boxes set is stuck all selected on

Thanks ajeh
it works now.

Basic essential, agreed, only make the ONE attribute name, then the rest falls into place when the option values are created using that one name.

19 Aug 2013, 9:11 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: attribute radio boxes set is stuck all selected on

Thanks for the update that you were able to step through the cleanup and remaking of the 1 Option Name with multiple Option Values to it ... :smile:

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!