Forums / Addon Templates / Flexible Attributes addon support

Flexible Attributes addon support

Views: 76,859

Results 241 to 260 of 274
27 Sep 2013, 8:12 PM
#241
gjh42 avatar

gjh42

Black Belt

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

Flexible Attributes addon support

You can give #wAttrib-7, #wAttrib-6 and #wAttrib-8 each width: 33%; and float: left; so they will sit side by side. You will probably need to limit the width of some sub-elements as well to make the whole attributes narrow; I can't test extensively now. Try these for starters: ```
#wAttrib-7, #wAttrib-6, #wAttrib-8 {width: 33%; float: left;}
#wAttrib-7 {clear: left; float: left;}
#wAttrib-7 input {}
#wAttrib-7 label, #wAttrib-6 label, #wAttrib-8 label {width: 10em; padding-right: 0.5em}
#wAttrib-7 .attrib-7-198 {clear: left; float: left;}

27 Sep 2013, 9:37 PM
#243
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: Flexible Attributes addon support

Thank you. As I was writting my next problem encountered with changing the layout of whole, left, right to left, whole, right. I realized I had to change the numbers on the flex.css otherwise they appeared on two rows instead of one.

I have to do this for a few more items. Hopefully with this example the others will be a breeze.

Thank you!

29 Sep 2013, 3:26 PM
#244
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: Flexible Attributes addon support

I have managed to get everything sorted ie left side of pizza is in left column, whole pizza is in center column, right side of pizza is in right column. Thank you for your help in that! I am trying to change the color of the center column so it is a little easier to distinguish columns. However It seems where I put {color: red} will either change 2 columns and break the 3 column side by side layout causing the Right column to be listed below in another row. Or it changes the left column and the center column to both be red.
Placing color into this row #wAttrib-6, #wAttrib-7, #wAttrib-8 {width: 33%; float: left;} will break the 3 columns into 2 rows.
placing color into this row #wAttrib-6 label, #wAttrib-7 label, #wAttrib-8 label {width: 10em; padding-right: 0.5em}
doesn't break the 3 columns into different rows but Won't allow me to only color the center column. It's either the left 2 columns or no columns.

Can someone please give me the correct formatting for this?
#wAttrib-6, #wAttrib-7, #wAttrib-8 {width: 33%; float: left;}
#wAttrib-6 {clear: left; float: left;}
#wAttrib-6 input {}
#wAttrib-6 label, #wAttrib-7 label, #wAttrib-8 label {width: 10em; padding-right: 0.5em}
#wAttrib-6 .attrib-6-198 {clear: left; float: left;}

Thank you. I hope that makes sense to anyone reading it.

30 Sep 2013, 1:44 PM
#245
gjh42 avatar

gjh42

Black Belt

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

Re: Flexible Attributes addon support

You want only the "whole pizza" column to be red, right? So make a rule just for that column: ```
#wAttrib-7 {color: red;}

30 Sep 2013, 3:13 PM
#246
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: Flexible Attributes addon support

I tried putting it everywhere else but on a seperate line. :(

Thank you,

I have another question then I think I will understand this enough to finish it.

Attribute#14 has 3-5 option values that are currently in a line. to make these display horizontally I need to put what into the file?

Thanks again for your help!

30 Sep 2013, 6:31 PM
#247
gjh42 avatar

gjh42

Black Belt

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

Re: Flexible Attributes addon support

That's not enough information for me to answer. What product has attribute 14? I don't see it in the page you have been working on.

5 Oct 2013, 10:57 PM
#250
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: Flexible Attributes addon support

I just wanted to come back and say thank you very much to GJH42 for this module and the support you have given! My site looks much better and is much friendlier and pages are loading faster now that they are shorter.

Thank you!

23 Oct 2013, 8:38 PM
#251
mike_d_1 avatar

mike_d_1

New Zenner

Join Date:
Sep 2013
Location:
Honolulu, HI
Posts:
88
Plugin Contributions:
0

Re: Flexible Attributes addon support

I've been looking for a couple days now and can't seem to find the answer, apologies if I've overlooked it:

I'd very much like to group attributes together by the html fieldset with a legend.

We're booking activities so there's a bit of information we collect from people, which I'm doing through product attributes, and I'd just like to group things logically (like name, contact information, etc.).

An example of what we currently do can be found here at the bottom of the page: http://www.shakatourshonolulu.com/ecotours/hanaumabaysnorkeling.html

I just for the life of me can't figure out how to make that work...is it even possible?

24 Oct 2013, 5:52 AM
#252
gjh42 avatar

gjh42

Black Belt

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

Re: Flexible Attributes addon support

Using actual <fieldset> elements would require a substantial amount of customized PHP coding to activate exactly at the right places.
Mimicking that effect is doable with stylesheet rules for the particular items in Flexible Attributes. I could give specific examples if I can see your Zen Cart site live. Essentially, you would give the left item in a group a comment in admin for the "fieldset" name, then position it with styling and give the item borders on top, bottom and left. The second item would get borders on top, right and bottom. Both would have to be given explicit heights and probably widths to ensure that their borders align. There may be a more elegant way of doing it using padding on the left item and absolute positioning on the right item.

24 Oct 2013, 8:07 AM
#253
mike_d_1 avatar

mike_d_1

New Zenner

Join Date:
Sep 2013
Location:
Honolulu, HI
Posts:
88
Plugin Contributions:
0

Re: Flexible Attributes addon support

gjh42:

Using actual <fieldset> elements would require a substantial amount of customized PHP coding to activate exactly at the right places.
Mimicking that effect is doable with stylesheet rules for the particular items in Flexible Attributes. I could give specific examples if I can see your Zen Cart site live. Essentially, you would give the left item in a group a comment in admin for the "fieldset" name, then position it with styling and give the item borders on top, bottom and left. The second item would get borders on top, right and bottom. Both would have to be given explicit heights and probably widths to ensure that their borders align. There may be a more elegant way of doing it using padding on the left item and absolute positioning on the right item.

Oh boy, sounds like I'd really be forcing it.

I appreciate your input and quick response. I'm new to this whole Zen Cart thing (and site-building in general) and wanted to recreate my site exactly as it looks now because I thought I nailed it. I see now I better adapt to the zen cart instead of fighting it. I suppose there's probably a way to get a lot of the relevant information we need by asking for it during another part of the checkout procedure.

Let me ask you this, instead of binding things together in a box is there a way to separate attributes with headings of some sort? Like having the legend without the fieldset?

24 Oct 2013, 1:56 PM
#254
gjh42 avatar

gjh42

Black Belt

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

Re: Flexible Attributes addon support

You can add a "comment" which will be output as a heading above any attribute, in stock Zen Cart (Option Name Manager, "edit" the option name after creating it). Flexible Attributes will let you style and group the attributes as you want. If you are not fixed on the precise "fieldset" appearance, grouping attributes under a heading is not that tricky. The second method I mentioned would be distinctly simpler and more robust than the first, and would be the way I would go. Let me see your ZC site and I will give you an example to apply.

25 Oct 2013, 3:54 AM
#256
gjh42 avatar

gjh42

Black Belt

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

Re: Flexible Attributes addon support

Add to your stylesheet_flexible_attributes.css```
#productAttributes {position: relative;}
#wAttrib-4 {position: relative; border: 1px solid #000000; padding: 0.8em; margin-top: 1em;}
#wAttrib-4>h3 {position: absolute; top: -1.8em; background: #ffffee; padding: 0 0.5em;}
#wAttrib-5 {position: absolute; left: 25em; top: 8.8em}


This positions the "last name" relative to the whole attributes container, so if the first name box changes position, they will no longer line up, and you will have to change the last name position to match.

The other sets of attributes can be handled the same way, adjusting dimensions as required.
25 Oct 2013, 4:46 AM
#257
mike_d_1 avatar

mike_d_1

New Zenner

Join Date:
Sep 2013
Location:
Honolulu, HI
Posts:
88
Plugin Contributions:
0

Re: Flexible Attributes addon support

Ooh yeah that looks just like it!

If I start adding in different attributes with different sort orders will I need to have a different stylesheet for each product?

25 Oct 2013, 2:14 PM
#258
gjh42 avatar

gjh42

Black Belt

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

Re: Flexible Attributes addon support

You might. If you run into issues with different products, then it will be time to deal with it. No biggie, you would just need to make a p_###.css stylesheet for each applicable product (### = the product id) with the relevant unique rules.

This stylesheet will only be loaded for the specific product, so you won't have a mess of different files clogging your browser.

27 Oct 2013, 11:20 PM
#259
mike_d_1 avatar

mike_d_1

New Zenner

Join Date:
Sep 2013
Location:
Honolulu, HI
Posts:
88
Plugin Contributions:
0

Re: Flexible Attributes addon support

ok. Thank you good sir, you are a scholar and a gentleman.

23 Nov 2013, 5:22 AM
#260
mike_d_1 avatar

mike_d_1

New Zenner

Join Date:
Sep 2013
Location:
Honolulu, HI
Posts:
88
Plugin Contributions:
0

Re: Flexible Attributes addon support

Hi. Me again.

I'm trying to get lengthier attribute comments but I keep getting cut off at around 64 characters and I can't seem to find an option to increase that. I notice that the NY Faerie Festival example has some pretty lengthy comments with multiple paragraphs and I'm wondering how I too can achieve that?