Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Want to add a line between Attributes

Want to add a line between Attributes

Locked

Views: 1,150

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
12 Feb 2008, 4:39 PM
#1
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Want to add a line between Attributes

Hi Folks!

What file should I modify to be able to have a horisontal line separating the attributes on a product page?

thanks!
Gabstero

12 Feb 2008, 5:16 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Want to add a line between Attributes

gabstero:

Hi Folks!

What file should I modify to be able to have a horisontal line separating the attributes on a product page?

thanks!
Gabstero

Try this... (a bit of hardcode hacking which I normally avoid!)

includes/templates/template_default/templates/tpl_modules_attributes.php

Find this section - around line 30

<div class="wrapperAttribsOptions">
<h4 class="optionName back"><?php echo $options_name[$i]; ?></h4>
<div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>
<br class="clearBoth" />
</div>

Put <hr> after the closing div

<div class="wrapperAttribsOptions">
<h4 class="optionName back"><?php echo $options_name[$i]; ?></h4>
<div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>
<br class="clearBoth" />
</div><hr>

You may do well to also set a style for this <hr>

12 Feb 2008, 5:27 PM
#3
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Want to add a line between Attributes

Thanks a TON!!!!!

Worked like a charm!

Gabstero

12 Feb 2008, 5:29 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Want to add a line between Attributes

You don't need to edit any PHP files. This can be done in your stylesheet (/includes/templates/your_template/css/stylesheet.css).

Add to your stylesheet in a location that you can remember:

.wrapperAttribsOptions {border-bottom: 1px solid #aabbcc;}

Adjust to taste.
This will put a line under each attribute including the last one. If you want lines only between attributes, and you don't have to cater to IE6 users, you can use this instead:

.clearBoth+.wrapperAttribsOptions {
border-top: 1px solid #aabbcc;
padding-top:1.5em;
}

IE6 does not support the Adjacent Selectors standard in CSS, so it will not be able to function properly here.

PS - if you do want to use the tpl_modules_attributes.php edit method, you should never change files in /template_default/. Copy the file to /your_template/ and edit there:

includes/templates/your_template/templates/tpl_modules_attributes.php

12 Feb 2008, 5:35 PM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Want to add a line between Attributes

gjh42:

You don't need to edit any PHP files. This can be done in your stylesheet (/includes/templates/your_template/css/stylesheet.css).

Thanks Glenn !

I knew there had to be a CSS way of doing this - only I'm hopeless at most CSS stuff.

Yes... rather than hard-code a php file, always better to use the stylesheet.

12 Feb 2008, 6:27 PM
#6
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Want to add a line between Attributes

Glenn and Schoolboy!

Thanks a lot! It makes sense NOT to modify the php files indeed.

Since we are at it (for the sake of not posting another thread), where would one usually paste the code that will show the SSL Certification on the home page? Should that be in one of the side boxes? Footer?

Thanks again!

Gabstero

12 Feb 2008, 6:32 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: Want to add a line between Attributes

The page location depends on what you want it to look like.

If you want it in a sidebox, there are mods in Downloads intended for displaying ssl seals and the like. Look at them and decide which is best for you.

12 Feb 2008, 7:44 PM
#8
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Want to add a line between Attributes

Glenn!

thanks a lot again! I found a sidebox for my GeTrust! Sooper!

thanks again!
G