Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Style arounf Add to Cart Plus Attributes

Style arounf Add to Cart Plus Attributes

Views: 1,209

Results 1 to 13 of 13
25 Mar 2011, 3:44 PM
#1
mickmo68 avatar

mickmo68

Zen Follower

Join Date:
Apr 2008
Location:
Boston
Posts:
129
Plugin Contributions:
0

Style arounf Add to Cart Plus Attributes

I'd like to put a border around the add to cart AND the attibutes on the product page. I feel it will make it easier for the customer to know where to add with attributes. I see #cartAdd and .wrapperattribsOptions to style, but nothing for the whole area. This may be due to the old TM I used.
NOTE: DO NOT USE TM. Creates WAY more issues than it's worth.

Any help would be appreciated.

25 Mar 2011, 4:26 PM
#3
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Style arounf Add to Cart Plus Attributes

Add a margin-top:50px to your #cartAdd, and border plus padding-top to your .wrapperattribsOptions

25 Mar 2011, 5:48 PM
#4
mickmo68 avatar

mickmo68

Zen Follower

Join Date:
Apr 2008
Location:
Boston
Posts:
129
Plugin Contributions:
0

Re: Style arounf Add to Cart Plus Attributes

Thank you Keneso,
Soooo close. It was fine until there are multiple attributes like this:

http://keepsafeco.com/baby-safety-gates/outdoor-safety-gate-decks-porches

Sorry for the ignorance. I appreciate your help. Can I get them all in the same box?
Thank you

25 Mar 2011, 5:54 PM
#5
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Style arounf Add to Cart Plus Attributes

Then try adding a div with an id to your tpl_product_info_display.php file to enclose both the .wrapperattribsOptions and #cartAdd, then style that in the stylesheet.

25 Mar 2011, 9:29 PM
#6
mickmo68 avatar

mickmo68

Zen Follower

Join Date:
Apr 2008
Location:
Boston
Posts:
129
Plugin Contributions:
0

Re: Style arounf Add to Cart Plus Attributes

Thank you again.
Unfortunately you've now gone over my head.
For now, I change the border back to only be around the #cartadd. I would like to box and border the add to cart along with all the attributes.
If someone could give me a piece of code sample that might work I would be most appreciative.

26 Mar 2011, 10:21 AM
#7
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Style arounf Add to Cart Plus Attributes

Sorry.
Please let me be more detailed - given TM hasn't changed too much, and left the comments on the file.

Browse to includes/templates/TM_TEMPLATE/templates folder, in there you could/should have a file named tpl_product_info_display.php open it in a text editor like notepad++ (if you don't have it google for it), here you should see something like <!--bof Add to Cart Box --> before that you could add a
<div id="myAddAttributeBox">,
then you should have something like <!--eof Attributes Module --> after that you add
</div>.
After this you browse to includes/templates/TM_TEMPLATE/css folder, and open the stylesheet.css file in the editor, and add at the end of it

#myAddAttributeBox {
border: 1px solid #FF0000;
}

Now you upload the two files in the respective folders to your server.
You might need to tweak a little bit with the other rules to get it display like you need.

NOTE
In case you have hard time locating the tpl_product_info_display.php file, use the
admin > tools > developer tool kit
to search for either <!--bof Add to Cart Box -->, or <!--eof Attributes Module --> to locate it.

26 Mar 2011, 4:00 PM
#8
mickmo68 avatar

mickmo68

Zen Follower

Join Date:
Apr 2008
Location:
Boston
Posts:
129
Plugin Contributions:
0

Re: Style arounf Add to Cart Plus Attributes

Above and beyond Keneso!! Thank you very much. It was just what I was looking to do.
:clap:

26 Mar 2011, 5:29 PM
#9
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Style arounf Add to Cart Plus Attributes

You're welcome, glad you made it.
You may want to add this to your stylesheet.css

.attribsRadioButton {padding-left: 5px}

13 Dec 2011, 3:10 PM
#10
dnnytn avatar

dnnytn

New Zenner

Join Date:
Dec 2011
Posts:
2
Plugin Contributions:
0

Re: Style arounf Add to Cart Plus Attributes

hi all,

i found this thread while doing a search on how to group my attributes. Following the posts here, i managed to put a border around the attributes, but what i really want to do is to have first 3 attributes in its own section or table, while the rest goes into another.

Delivery table similar to this: http://www.fareastflora.com/detail.aspx?TYP=FLG&PCAT=FLG-HBQ&PCD=PS02

I am running an online florist and i would like to have the delivery date, time and message card show as one table and the other optional add ons as another table.

just having picked up css and php in the past month, with no background in web development at all, i am very wary of making changes now that i have this site almost the way i want.

would appreciate any advise or help anyone can provide here.

my setup:

13 Dec 2011, 3:38 PM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: Style arounf Add to Cart Plus Attributes

Try Flexible Attributes in Free Addons. It lets you address attributes individually; you can do almost anything if you know the right CSS for it.

13 Dec 2011, 4:01 PM
#12
dnnytn avatar

dnnytn

New Zenner

Join Date:
Dec 2011
Posts:
2
Plugin Contributions:
0

Re: Style arounf Add to Cart Plus Attributes

Thanks gjh42!

Checking out flexible attributes now. While looking, it seems that i have to edit stylesheet_flexible_attributes.css file. While i am still learning how to edit css, possible to give me a starting point on editing it to group 3 attributes together?

Something like:

/attribute layout/

.wrapperAttribsOptions label {font-size: 1.0em;}/make "label" elements match other text/

h3#attribsOptionsText {display: none;}/hide the "Please Choose:" heading/

h4.optionName {font-size: 1.0em;}

.wrapperAttribsOptions+br.clearBoth {display: none;}/allow floated attributes to sit side by side if desired/

#wAttrib-4 {clear: left; float: left;border-top-style:solid; margin-top: 50px;}

#wAttrib-5 {float: right; border-top-style:solid; margin-top: 30px;}/this will sit beside #wAttrib-11/

#wAttrib-6 {clear: left;}/this will sit on a new line/

#wAttrib-14 h4 {display: none;}

#wAttrib-15 h3 {font-size: 1em; font-weight: normal;}/make comments above attribute like standard text/

#wAttrib-35 .attribsOptions {display: none;}/for a read-only attribute to hide all but comments/

13 Dec 2011, 4:09 PM
#13
gjh42 avatar

gjh42

Black Belt

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

Re: Style arounf Add to Cart Plus Attributes

You won't be able to structurally group attributes without custom PHP code, but you can arrange them and give them border sections to make it look like a group using style rules.
It would be more complicated to give theoretical rules for this than to give the actual rules for your particular situation.

I suggest you take some time to study CSS, as you really need to know how to use it for most of your site's customized appearance. https://www.w3schools.com is a good place to start.