Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Attributes - trouble setting them up

Attributes - trouble setting them up

Locked

Views: 1,199

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
28 Jan 2008, 6:09 PM
#1
jtjohnston avatar

jtjohnston

New Zenner

Join Date:
Mar 2007
Posts:
73
Plugin Contributions:
0

Attributes - trouble setting them up

I'm back. I gave up on Zen because I thought I could find another cart that would do this easier. I'm going to give this a second chance.

Under attributes_controller.php I have three Option Names set up as radio buttons:

Red
Blue
Green
They all share the same the same Option Value=color.

When I click on preview (and look at the HTML) they all have different names:

name="id[10]"
name="id[11]"
name="id[12]"
I want the client to choose either red, blue or green.
name="id[10]"
name="id[10]"
name="id[10]"
Where did I go wrong? I have read, practised and poured over: https://www.zen-cart.com/tutorials/index.php?article=57

John

28 Jan 2008, 6:13 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Attributes - trouble setting them up

You've done it backwards.

Try this:

Option Name: Colour
Option Values: Red, Green, Blue.

28 Jan 2008, 7:43 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Attributes - trouble setting them up

Looks like you mostly found a way to do it...

The way that will always work is to add this to your stylesheet:

h4.optionName {width: 5.0em; text-align: right;}

I don't know why the Belt item was not working, but the text-align takes care of it.

28 Jan 2008, 7:46 PM
#5
jtjohnston avatar

jtjohnston

New Zenner

Join Date:
Mar 2007
Posts:
73
Plugin Contributions:
0

Re: Attributes - trouble setting them up

gjh42:

Looks like you mostly found a way to do it...

The way that will always work is to add this to your stylesheet:

h4.optionName {width: 5.0em; text-align: right;}

I don't know why the Belt item was not working, but the text-align takes care of it.

Oh, I'll try that! I was adding html: & n b sp ;

Thanks!
John

P.S. Works like a charm! Thanks.