-
Flexible Attributes addon support
Flexible Attributes has been submitted to Free Addons.
This mod allows control over the display of individual attributes on the product info page. Each attribute can be styled globally to affect it in all products which use it, or with a per-product stylesheet to affect its display in only one product.
All user customization is done through the stylesheet (example stylesheet included).
An optional SQL patch is included to allow longer Option Name comments if desired.
-
Re: Flexible Attributes support
An example of this mod in use can be seen at www.nyfaeriefest.com . Click on "Artist Vendors", then "Artist Vendor Application". This is an extreme example, showing a "product" turned into an application form which collects a wide variety of types of info including images and saves it to the database.
On a more ordinary level, attributes can be organized into columns or given individual styling for whatever purposes may arise.
-
Re: Flexible Attributes support
Thank you for contributing this great mod!
-
Re: Flexible Attributes support
I thank you for this awesome mod however, is there a way to place a dropdown underneath the option text? Please see link for example.
http://www.modebook.com/cart/index.p...&products_id=1
Thanks
Jeff
-
Re: Flexible Attributes support
Are you wanting to get the dropdown to be under the "Number of 2-Page Spreads" text? Add to your stylesheet
Code:
#wAttrib-2 .back {float: none;}
-
Re: Flexible Attributes support
Thank you so much, a great contribution!!!!:clap:
However, I'm having a bit of a problem getting a TEXT attribute to sit to the right of a RADIO attribute. Should this work or does it only work with dropdowns?
/*Promo Code (radios)*/
#wAttrib-5 {float:left;; margin:0; Padding:0 5px 0 30px;}
#wAttrib-5 label {float:left; text-align:right; width:84px; margin:0; padding:0;}
#wAttrib-5 .back{float:left; margin-top:3px;}
#attrib-5-9, #attrib-5-10, #attrib-5-11, #attrib-5-12{width:30px;}
/*Promo Code URL*/
#wAttrib-6 {clear:left; float:left; margin:0; Padding:0 5px 0 0;}
#wAttrib-6 label {float: left; text-align:right; width:100px; margin:0; padding:0;}
#wAttrib-6 .back{ margin-top:3px;}
-
Re: Flexible Attributes support
I can't tell for sure what should be happening here, or what is actually happening on your site. A link to see it live will let me advise.
-
Re: Flexible Attributes support
Quote:
Originally Posted by
gjh42
I can't tell for sure what should be happening here, or what is actually happening on your site. A link to see it live will let me advise.
Thanks man! I fixed it now anyways with this:
/*Promo Code (radios)*/
#wAttrib-5 {clear:left; float:left; margin:0; Padding:0 5px 0 30px;}
#wAttrib-5 label {float:left; text-align:right; width:84px; margin:0; padding:0;}
#wAttrib-5 .back{float:left; margin-top:3px;}
#attrib-5-9, #attrib-5-10, #attrib-5-11, #attrib-5-12{width:30px;}
/*Promo Code URL*/
#wAttrib-6 {float:left; margin:0; Padding:0 5px 0 0;} Removed clear:left on this line
#wAttrib-6 label {float: left; text-align:right; width:100px; margin:0; padding:0;}
#wAttrib-6 .back{ margin-top:3px;}
-
Re: Flexible Attributes support
Re Side by side read-only attributes... possible? how?
You can space out the attributes in a row by adding side margins or padding, such as this at the bottom of your stylesheet:
Code:
/*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-3 {clear: left; float: left;}
#wAttrib-4 {float: left;}/*this will sit beside #wAttrib-3*/
#wAttrib-5 {float: left;}/*this will sit beside #wAttrib-4*/
/*#wAttrib-5 {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*/
.attribsOptions {margin-right: 2.0em;}
Note also that CSS does not recognize the // comment; you need to use /* */ around the commented code as shown.
-
Re: Flexible Attributes support
Thanks for the spacing tip! Worked perfectly.
Does your mod also allow attributes to list the option values themselves side by side instead of in a vertical list? Such as:
Style 1: Small, Medium, Large
Style 2: Small, Medium, Large
I'm just trying to figure out the cleanest way to list read-only attributes. My ideal would be a table of some kind, but I'm not sure if the Product Attribute Grid add-on works with read-only attributes.
-
Re: Flexible Attributes support
Hi we have downloaded the flexible attributes which is great :D
but we would like all the attributes to sit to the right of the picture
in list format ie one under the other and the option names above eg
Name
dropdown
Size
dropdown
image
dropdown
etc etc.....
is there a way we can acheive this if so how?
thanks
-
Re: Flexible Attributes support
Let's see your site so I can give accurate advice for your specific layout.
-
Re: Flexible Attributes support
-
Re: Flexible Attributes support
think we may have sorted it put padding-right which moved them all down :D
just wondering if you have to duplicate all the attributes in the stylesheet to get the same layout for all, or whether there is a way of making all attributes in the stylesheet across the site do the same.
ie on tshirts the attributes 1,3,4,5 and 6 are all laying to the right of the image but on our cushions attributes 12,13,14,15 are laying to the right hand side.:frusty:
-
Re: Flexible Attributes support
If you want an effect for specific attributes, use a selector like #wAttrib-1, #wAttrib-2 {}.
If you want styling to apply to all attributes, you can use .wrapperAttribsOptions {}.
-
Re: Flexible Attributes support
If you want most of the attributes to sit one per row, but certain small ones to sit to the right of the preceding attribute, you can add to your stylesheet
.wrapperAttribsOptions {width: 300px;}
and then add to #wAttrib-6 {
...
width: auto;
}
Eliminate the paddings as they may interfere with the widths in some cases.
-
Re: Flexible Attributes support
we are still struggling with the flexible attributes.
we added the 300px width to the wrapperAttribsOptions in the css stylesheet and it moved all the attributes beneath the image.
We want to achieve the image on the left hand side and then the attributes listed one beneath each other to the right of the image but left hand aligned. We want to apply this to all attributes on all products.
How is the easiest way to achieve this, we have tried padding and margins but we would need to apply that to each individual attribute(and we have loads!!!)
www.artifaxonline.co.uk/t-shirts
-
Re: Flexible Attributes support
Looks like you have figured out enough of the CSS to get the attributes located. Floating them right with a width more than half the column width also takes care of the case where they go lower than the main image.
The last thing you need to do is get the discount box to stay below the rest. Add to your stylesheet
#productQuantityDiscounts {clear: left;}
if you want it just below the image, or
#productQuantityDiscounts {clear: both;}
if you want it below the add button.
Also, you don't need to apply universal styling to attributes one at a time; all #wAttrib-x elements are also .wrapperAttribsOptions elements, so styling .wrapperAttribsOptions will automatically apply to any that are not individually styled with #wAttrib-x.
-
Re: Flexible Attributes support
Hi
Is this ok to use with 1.3.9d please?
Tia
Paul
-
Re: Flexible Attributes support
I haven't tested it yet, but one file in the mod has changed for v1.3.9: /includes/modules/attributes.php.
There is only one added line of mod code in that file (around line 606), so it should be extremely easy to apply that to the new version - just copy/paste that line in the appropriate place in the new file.
PHP Code:
$options_wrapper_id[] = 'wAttrib-' . $products_options_names->fields['products_options_id'];//gjh42
I will get the download updated as soon as some testing for another improvement to the mod is finished.
-
Re: Flexible Attributes support
Thanks for the quick reply Glenn, and the code.
I can do that no problem, but I may wait for your updated version as I am still in build mode :-)
Paul
-
Re: Flexible Attributes support
Thanks gjh42 for an incredible and easy to use mod! :clap:
I was able to do exactly what I wanted with a combination of your mod and the instructions and advice given in this thread:
http://www.zen-cart.com/forum/showthread.php?t=159306
The result can be seen here
I played with the image size to help control the spacing (not very css literate) but still have some text cramming going on. You can see that the text from the attribute in column two is running into the attribute text in column three.
Is there a simple fix to separate these?
Thanks in advance for your help.
-
Re: Flexible Attributes support
Sorry for a second post, seems I can't edit or add to the previous one.
I came up with a quick fix for my problem; I shortened the attribute text. However, this won't be a long term fix, so if you click the link I provided, and it appears to be fixed, it isn't.
I would still love to hear of a more permanent solution. I am thinking maybe I add padding for the attribute in the css, but am not confident.
Thanks!
-
Re: Flexible Attributes support
Your thinking is correct. You can add padding or margins, such as this example:
.wrapperAttribsOptions {margin-right: 1.0em;}
-
Re: Flexible Attributes support
Thanks gjh42!
I tried the example exactly as you provided and it did work for the attribute in question.
However, you gave me the confidence to try padding. After playing with it for a bit, I settled with padding of .5em. Anything larger pushed the attribute in question off the page.
The padding made all of the products with multiple attributes look less crowded, and very beautiful!
Another question if I may:
Is it possible to just pad the bottom and left? It occurs to me that if it were possible, padding just those two would create the best appearance for all of the attributes.
Thanks again for the great mod and super support!
-
Re: Flexible Attributes support
.wrapperAttribsOptions {margin: 0 0 0.5em 0.5em;}
-
Re: Flexible Attributes support
Thanks a million! Works beautifully!
I am actually still in shock. You have also taught me something new.
This mod allows me to control the exact placement of each and every attribute, individually. Genius!
I also see that you provided a way for us to control the attribute font too.
Thanks again for a brilliant and easy to use mod.
-
Re: Flexible Attributes support
Yep, its me again... sorry. Just when it looked like I learned enough to quit bugging you, I get too big for my britches.
Here is the problem
Here is the css:
#wAttrib-12 {float: left; margin: 0 2.0em 2.0em 0;}
#wAttrib-13 {float: left; margin: 0 2.0em 2.0em 0;}
#wAttrib-14 {float: left; margin: 0 2.0em 2.0em 0;}
#wAttrib-15 {clear: left; margin: 0 2.0em 2.0em 0;}
#wAttrib-16 {float: left; margin: 0 2.0em 2.0em 0;}
#wAttrib-17 {float: left; margin: 0 2.0em 2.0em 0;}
#wAttrib-18 {float: left; margin: 0 0 2.0em 0;}
The numbers do correspond to the attribute option names in order. I am trying to create 3 rows, but for some reason I can't get 16 to share the row with 15. I haven't even tried playing with 17 and 18 yet.
Thanks in advance for your time and expertise.
Lisa
-
Re: Flexible Attributes support
#wAttrib-15 {float: left; clear: left; margin: 0 2.0em 2.0em 0;}
You changed the float to clear on wAttrib-15, instead of adding the clear. Without the float, the div takes the full width of its container and keeps anything else from joining it.
-
Re: Flexible Attributes support
Thanks Glen for the quick reply. I changed 15 to your example and some strange things are taking place.
click here to see
In a perfect world, 12, 13, 14 would sit on line one.
15, 16 on line two, and since I don't think 17 and 18 will fit on line two, they should be on line three.
Key:
12 14kt White Gold
13 14kt Yellow Gold
14 Platinum
15 White Diamond
16 White Sapphire
17 White Topaz
18 Black Diamond
Thanks in advance (again) for your time.
-
Re: Flexible Attributes support
It's behaving just as it ought to, given your styling. If you want 17 to start a new line, you need to add the clear: left; to it:
#wAttrib-17 {float: left; clear: left; margin: 0 2.0em 2.0em 0;}
-
Re: Flexible Attributes support
A note for those interested: There is a changed file for v1.3.9 that relates to Flexible Attributes, as described in another thread. I copy the info here.
The only change for v1.3.9 is two lines in /includes/modules/attributes.php (around line 400) where
ereg_replace('txt_',
is replaced by
preg_replace('/txt_/',
for PHP5.3 compatibility.
If your server is still running PHP5.2.x, you can use the existing mod as is; for future-proofing, you can make those two edits to the mod version of the file. I will update the mod with the new file, but can't say how long it will be until it is available in Free Addons.
-
Re: Flexible Attributes support
No luck. Either way they get squirrelly. I can only guess it has something to do with some other conflicting css somewhere.
The best case for now is this
-
Re: Flexible Attributes support
There was another rule that needed to be changed in exactly the same way, as I mentioned in post 30. Modifying these rules as shown gives a neat-looking result.
Code:
#wAttrib-15 {float: left; clear: left; margin: 0 2.0em 2.0em 0;}
#wAttrib-16 {float: left; margin: 0 2.0em 0em 0;}
#wAttrib-17 {float: left; clear: left; margin: 0 2.0em 2.0em 0;}
#wAttrib-18 {float: left; margin: 0 0 2.0em 0;}
If you want something different, you can alter to taste.
-
Re: Flexible Attributes support
Thanks for continuing to offer your expertise. I should have been more clear in my last post.
I added both changes exactly as you suggested, and just to make sure I didn't factor into the issue, I changed it again using the block of css you provided with copy and paste.
Here is the result
Not only do some squish, but after the first three, they jump out of order. This is why I assumed there was something else conflicting.
-
Re: Flexible Attributes support
I'm not sure what you mean by "squishing". They all look similarly spaced; if you want the line or element spacing a bit larger, that can be done in the stylesheet. They are also in numerical order of id. If you want something else, you can set the sort order in Option Name Manager.
When I posted, you did not have the changes to #wAttrib-15 in effect.
I am seeing it now in IE8 (my computer is not letting Firefox open right now), but it looked fine in Firefox when I tested it.
-
1 Attachment(s)
Re: Flexible Attributes support
You are right, when you posted I had already put it back. The sort order in the option name is already applied. Since it looks good to you I am confused. Here is what I am seeing in the attached image
-
Re: Flexible Attributes support
Quote:
Originally Posted by
Bonkycat
You are right, when you posted I had already put it back. The sort order in the option name is already applied. Since it looks good to you I am confused. Here is what I am seeing in the attached image
I have just installed the Flexible Attributes mod and think it is great - thankyou. My website is not quite finished but am wandering if somebody that knows CSS can help me out. The page I am having problems with is here:
http://www.umbrellas4life.com/index....products_id=89
And my stylesheet looks like this:
/**
* Additional CSS Stylesheet
*
* @copyright Copyright 2009 Glenn Herbert
* @copyright Portions Copyright 2003-2006 Zen Cart Development Team
* @license http://www.gnu.org/licenses/ GNU Public License V3.0
* @version $Id: stylesheet_flexible_attributes.css $
* for Flexible Attributes by Glenn Herbert (gjh42) 20091228
*/
/*example stylesheet for a set of product attributes
These are samples of the kinds of styling you may want to apply to various kinds of elements.
Adjust as required. Comment out any that are not useful to you.
For attributes of a single product, you can save this file as p_##.css where ## is the product id.
*/
/*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-1 {float: left; margin-left: 1.3em; margin-right: 3.0em;}
#wAttrib-1 h4 {display: none;}
#wAttrib-15 {float: left; margin-right: 3.0em;}/*this will sit beside #wAttrib-1*/
#wAttrib-15 h4 {display: none;}
#wAttrib-18 {float: left; margin-right: 3.0em;}/*this will sit beside #wAttrib-15*/
#wAttrib-18 h4 {display: none;}
#wAttrib-19 {float: left;}/*this will sit beside #wAttrib-18*/
#wAttrib-19 h4 {display: none;}
#wAttrib-20 {clear: left; float: left; margin-left: 1.3em; margin-right: 3.0em;}/*this will sit on a new line*/
#wAttrib-20 h4 {display: none;}
#wAttrib-21 {float: left; margin-right: 3.0em;}/*this will sit beside #wAttrib-20*/
#wAttrib-21 h4 {display: none;}
#wAttrib-22 {float: left; margin-right: 3.0em;}/*this will sit beside #wAttrib-21*/
#wAttrib-22 h4 {display: none;}
#wAttrib-23 {float: left;}/*this will sit beside #wAttrib-22*/
#wAttrib-23 h4 {display: none;}
#wAttrib-3 {clear: left; float: left; margin-left: 0.95em; margin-top: 3.0em;}/*this will sit on a new line*/
#wAttrib-13 {clear: left; float: left; margin-left: 0.85em;}/*this will sit on a new line*/
#wAttrib-14 {clear: left; float: left; margin-left: 0.85em; margin-right: 5.0em;}/*this will sit on a new line*/
#wAttrib-17 {float: right; margin-right: 1.1em;}/*this will sit beside #wAttrib-14*/
#wAttrib-56 h3 {font-size: 1.0em; font-weight: normal;}/*make comments above attribute like standard text*/
#wAttrib-57 .attribsOptions {display: none;}/*for a read-only attribute to hide all but comments*/
#wAttrib-24 h4 {display: none;}
#wAttrib-25 h4 {display: none;}
#wAttrib-26 h4 {display: none;}
#wAttrib-27 h4 {display: none;}
#wAttrib-28 h4 {display: none;}
#wAttrib-29 h4 {display: none;}
#wAttrib-30 h4 {display: none;}
#wAttrib-31 h4 {display: none;}
#wAttrib-24 {clear: left; float: left; margin-left: 1.3em; margin-right: 9.2em;}
#wAttrib-25 {float: left; margin-right: 9.2em;}
#wAttrib-26 {float: left; margin-right: 9.2em;}
#wAttrib-27 {float: left;}
#wAttrib-28 {clear: left; float: left; margin-left: 1.3em; margin-right: 9.2em;}
#wAttrib-29 {float: left; margin-right: 9.2em;}
#wAttrib-30 {float: left; margin-right: 9.2em;}
#wAttrib-31 {float: left;}
My problem is that it all looks aligned and neat in IE8 but in previous versions of IE and Firefox, my attributes, controlled by this CSS become unaligned. I know very little about stylesheets ... Am I missing something out or using 'em's when I should be using 'px's? Any help would be greatly appreciated.
-
Re: Flexible Attributes support
Which attributes become unaligned, and by how much? All I see in Firefox is that #wAttrib-19 and #wAttrib-27 are off by two pixels (as are -23 and -31). You appear to have reconfigured your stylesheet since posting, so I can't address what you saw then.
You now have
#wAttrib-24 {clear: left; float: left; margin-left: 1.3em; margin-right: 5.0em;}/*this will sit on a new line*/
#wAttrib-25 {float: left; margin-right: 5.0em;}/*this will sit beside #wAttrib-24*/
#wAttrib-26 {float: left; margin-right: 4.85em;}/*this will sit beside #wAttrib-25*/
#wAttrib-27 {float: left;}/*this will sit beside #wAttrib-26*/
which would account for the two px - is this to correct something in IE?
Also, you have a few style properties repeated for every attribute. Instead of specifying them for every id, you could be much more efficient and specify them for .wrapperAttribsOptions {} or .wrapperAttribsOptions h4 {} once; this will apply to all #wAttrib- elements.
-
Re: Flexible Attributes support
Bonkycat - I don't know why you are seeing such a strange layout. I also see it correctly in Firefox now, with rows of three metals, two stones and two stones. Could it have been some sort of cache problem? Do you still have the problem?
-
Re: Flexible Attributes support
Quote:
Originally Posted by
gjh42
Flexible Attributes has been submitted to Free Addons and should be available for download soon.
This mod allows control over the display of individual attributes on the product info page. Each attribute can be styled globally to affect it in all products which use it, or with a per-product stylesheet to affect its display in only one product.
All user customization is done through the stylesheet (example stylesheet included).
An optional SQL patch is included to allow longer Option Name comments if desired.
So color me tardy to the party!!!:laugh: This is SO much better than the method I used to achieve an improved layout for attributes.. As usual Glenn, you rock!!!:clap:
-
Re: Flexible Attributes support
-
Re: Flexible Attributes support
Quote:
Originally Posted by
gjh42
Glad you like it :)
I haven't used it yet, but I will.. :clap:(I can say this sight unseen since I have no doubt in my mind that anything you contribute is a top notch solution out the gate!!) I remember you talking about how this could be implemented using only CSS on that thread regarding my hack for creating a two column attribute layout..
THIS is way better than the hack I was using, and since it's using CSS to manage the layout, it's infinitely more flexible than my table solution..
I believe that this will be a part of my standard "must have" Zen Cart modules for any future Zen Cart stores I build..
-
Re: Flexible Attributes support
To be fair, the majority of stores will do fine with the stock attribute layout controls... but this should take care of pretty much anything that needs more.
-
Re: Flexible Attributes support
Quote:
Originally Posted by
gjh42
To be fair, the majority of stores will do fine with the stock attribute layout controls... but this should take care of pretty much anything that needs more.
Agreed..:yes::yes: For the most part so have I..:laugh::laugh: Let me clarify my previous statement.. I would like a LOT more control over the way the default attributes layout looks in general.. Especially since I have a few clients who have product pages for custom product which have many attributes.. Having the attributes in rows versus a super long vertical stack is ideal IMHO..
-
Re: Flexible Attributes support
-
Re: Flexible Attributes support
ok. great!
dear all,
I really need your help!
I am doing a e-store selling contactlenses and i have 2 core issues (for now) to solve:
1. to put (related) attributes horizontally, and
2. to get both my QTY (quantity) attribute for left eye and right eye add up to the shopping cart QTY total.
I found the flexible attributes module for doing the horizontal thing and did the following script:
/*attribute layout*/
.wrapperAttribsOptions label {font-size: 1.0em;}/*make "label" elements match other text*/
h3#attribsOptionsText {display: none;}/*'Display: None;' to 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-20 {clear: left; float: left;}
#wAttrib-21 {float: left;}/*this will sit beside #wAttrib-20*/
#wAttrib-22 {float: left;}/*this will sit beside #wAttrib-21*/
#wAttrib-23 {float: left;}/*this will sit beside #wAttrib-22*/
#wAttrib-24 {float: left;}/*this will sit beside #wAttrib-23*/
#wAttrib-25 {clear: left; float: left}/*this will sit on a new line*/
#wAttrib-26 {float: left;}/*this will sit beside #wAttrib-25*/
#wAttrib-27 {float: left;}/*this will sit beside #wAttrib-26*/
#wAttrib-28 {float: left;}/*this will sit beside #wAttrib-27*/
#wAttrib-29 {float: left;}/*this will sit beside #wAttrib-28*/
#wAttrib-21 .back {float: none;}
#wAttrib-22 .back {float: none;}
#wAttrib-23 .back {float: none;}
#wAttrib-24 .back {float: none;}
#wAttrib-26 .back {float: none;}
#wAttrib-27 .back {float: none;}
#wAttrib-28 .back {float: none;}
#wAttrib-29 .back {float: none;}
/**EOF**/
This is what i get:
http://cplens.com/index.php?main_pag...roducts_id=180
please help!
Oh yes, if anyone can solve my QTY attributes add up problem (or can direct me to anywhere for the solution), do tell me also. Thanks.
NOTE: dunno php; noob.
Happy Holidays!
-
Re: Flexible Attributes support
...
my fault.
to be clear about my script:
attribute 20 = Right Eye.
attributes 21 to 24 are all Right Eye related attributes. They should be on one roll.
attribute 25 = Left Eye.
attributes 26 to 29 are all the Left Eye related attributes. They should be on the same roll after RE's attributes.
Thanks.
-
Re: Flexible Attributes support
Thinking as a customer, would it be more intuitive to have the left eye attributes on the left? Or is it an industry standard to always mention right eye first?
I'll look at your layout now.
-
Re: Flexible Attributes support
You had clear: left; for the first left attribute, so it started a new line as the comment indicates. Just remove that.
Code:
#wAttrib-25 {float: left; clear: left;}/*this will sit on a new line*/
Code:
#wAttrib-25 {float: left;}/*this will not sit on a new line*/
-
Re: Flexible Attributes support
yup. right eye first and top of left eye. that's how they (... specialist who examine your eyesight when you make your spectacles. can't remember the name for it).
the layout is suppose to be in squence of what patient got from their eye-physician... or that spectacle man... -.-'...
-
Re: Flexible Attributes support
Quote:
Originally Posted by
gjh42
You had clear: left; for the first left attribute, so it started a new line as the comment indicates. Just remove that.
Code:
#wAttrib-25 {float: left; clear: left;}/*this will sit on a new line*/
Code:
#wAttrib-25 {float: left;}/*this will not sit on a new line*/
eh...
must be right eye attributes on top then left eye attributes below. its a instudry standard issue, not that i am fussy. try make a pair of specs and ask for your eye test result slip...
i wish it can be simpler... T_T...
-
Re: Flexible Attributes support
Quote:
Originally Posted by
windchaser
yup. right eye first and top of left eye. that's how they (... specialist who examine your eyesight when you make your spectacles. can't remember the name for it).
the layout is suppose to be in squence of what patient got from their eye-physician... or that spectacle man... -.-'...
**off topic post**
An Optometrist is a Doctor of Optometry, an O.D. (not to be confused with a Doctor of Medicine, an M.D.). To become an optometrist, one must complete pre-professional undergraduate college education followed by 4 years of professional education in a college of optometry. Some optometrists also do a residency.
An Ophthalmologist is an eye M.D., a medical doctor who is specialized in eye and vision care. Ophthalmologists are trained to provide the full spectrum of eye care, from prescribing glasses and contact lenses to complex and delicate eye surgery. They may also be involved in eye research.
-
Re: Flexible Attributes support
Quote:
Originally Posted by
DivaVocals
**off topic post**
An Optometrist is a Doctor of Optometry, an O.D. (not to be confused with a Doctor of Medicine, an M.D.). To become an optometrist, one must complete pre-professional undergraduate college education followed by 4 years of professional education in a college of optometry. Some optometrists also do a residency.
An Ophthalmologist is an eye M.D., a medical doctor who is specialized in eye and vision care. Ophthalmologists are trained to provide the full spectrum of eye care, from prescribing glasses and contact lenses to complex and delicate eye surgery. They may also be involved in eye research.
thanks. learnt something today.
so how can i get my attributes aligned just as the eye test slip we get from an optometrist -- RE top, LE bottom all in sequence... :dontgetit
-
Re: Flexible Attributes support
I expect an examiner looks at the right eye (on the left from his viewpoint) first, so it makes sense that that is how reports are organized.
I thought you were saying you wanted all the attributes on one row. You already had them organized the way you are describing now... can you show in detail how you want it to look?
-
Okay so I'm not the only one who looked at the site and thought this very same thing.. I was going to make the same suggestion, but thought I was missing something.. LOL..
Quote:
Originally Posted by
gjh42
I expect an examiner looks at the right eye (on the left from his viewpoint) first, so it makes sense that that is how reports are organized.
I thought you were saying you wanted all the attributes on one row. You already had them organized the way you are describing now... can you show in detail how you want it to look?
Posted via Mobile Device
-
Re: Flexible Attributes support
I just did the same thing with flexible attributes. I was also able to take out the ugly references to attribute names like "power range 2" (ie left)
Code:
/*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-3 {
clear: left;
float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/bc.gif);
border: 1px solid #cccccc;
}
#wAttrib-3 h4 {display: none;}
#wAttrib-2 {float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/power.gif);
border: 1px solid #cccccc;}
#wAttrib-2 h4 {display: none;}
#wAttrib-4 {float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/cyl.gif);
border: 1px solid #cccccc;}
#wAttrib-4 h4 {display: none;}
#wAttrib-5 {float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/axis.gif);
border: 1px solid #cccccc;}
#wAttrib-5 h4 {display: none;}
#wAttrib-6 {float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/adds.gif);
border: 1px solid #cccccc;}
#wAttrib-6 h4 {display: none;}
#wAttrib-13 {float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/qty.gif);
border: 1px solid #cccccc;}
#wAttrib-13 h4 {display: none;}
#wAttrib-7 h4 {display: none;}
#wAttrib-8 {
clear: left;
float: left;
padding: 10px 10px 10px 40px;
border: 1px solid #cccccc;
background-image: url(../images/bc.gif);
}
#wAttrib-8 h4 {display: none;}
#wAttrib-9 {float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/power.gif);
border: 1px solid #cccccc;}
#wAttrib-9 h4 {display: none;}
#wAttrib-10 {float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/cyl.gif);
border: 1px solid #cccccc;}
#wAttrib-10 h4 {display: none;}
#wAttrib-11 {float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/axis.gif);
border: 1px solid #cccccc;}
#wAttrib-11 h4 {display: none;}
#wAttrib-12 {float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/adds.gif);
border: 1px solid #cccccc;}
#wAttrib-12 h4 {display: none;}
#wAttrib-14 {float: left;
padding: 10px 10px 10px 40px;
background-image: url(../images/qty.gif);
border: 1px solid #cccccc;}
#wAttrib-14 h4 {display: none;}
#wAttrib-15 {display: none;}
this worked wonders for me, and allowed me to hide names with images. you will of course have to set it according to your own attribute layout, and either make images for it, or find another way to display your attribute names.
-
Re: Flexible Attributes support
Quote:
Originally Posted by
gjh42
I expect an examiner looks at the right eye (on the left from his viewpoint) first, so it makes sense that that is how reports are organized.
I thought you were saying you wanted all the attributes on one row. You already had them organized the way you are describing now... can you show in detail how you want it to look?
This is how it is supposed to be:
Right Eye (RE/OD) QTY(RE) PWR(RE) BC(RE) DIA(RE) CYL(RE) AXS(RE)
Left Eye (LE/OS) QTY(LE) PWR(LE) BC(RE) DIA(LE) CYL(LE) AXS(LE)
___
Not all lenses have CYL and AXS discription. Most of them ends at DIA (Diameter). CYL and AXS are for Toric Lenses for people who have astigmatism.
-
Re: Flexible Attributes support
So you want the dropdown boxes in the same line with their labels? From your stylesheet, it looked like you had added rules to specifically put them below their labels. Delete or comment out these rules:
Code:
/*Aline Dropdown Box Below Attribute's OptionName*/
/*
#wAttrib-21 .back {float: none;}
#wAttrib-22 .back {float: none;}
#wAttrib-23 .back {float: none;}
#wAttrib-24 .back {float: none;}
#wAttrib-26 .back {float: none;}
#wAttrib-27 .back {float: none;}
#wAttrib-28 .back {float: none;}
#wAttrib-29 .back {float: none;}
*/
-
Re: Flexible Attributes support
If that is not what you want, maybe you mean to have the Right/Left Eye line up with the labels that follow?
Right Eye QTY (RE) PWR (RE) BC (RE) DIA (RE)
. . . . . . . . . . [] . . . . . [] . . . . . . [] . . . . . []
Your stylesheet comments out the rules and properties that would do just that:
Code:
/*#wAttrib-20 {clear: left; float: left;}*/
/*#wAttrib-20, #wAttrib-21, #wAttrib-22, #wAttrib-23, #wAttrib-24 {float: left;}*/
#wAttrib-21, #wAttrib-22, #wAttrib-23, #wAttrib-24 {float: left;}
#wAttrib-25 {clear: left; /*float: left;*/}/*this will sit on a new line*/
#wAttrib-26, #wAttrib-27, #wAttrib-28, #wAttrib-29 {float: left;}
-
Re: Flexible Attributes support
Quote:
Originally Posted by
gjh42
If that is not what you want, maybe you mean to have the Right/Left Eye line up with the labels that follow?
Right Eye QTY (RE) PWR (RE) BC (RE) DIA (RE)
. . . . . . . . . . [] . . . . . [] . . . . . . [] . . . . . []
Your stylesheet comments out the rules and properties that would do just that:
Code:
/*#wAttrib-20 {clear: left; float: left;}*/
/*#wAttrib-20, #wAttrib-21, #wAttrib-22, #wAttrib-23, #wAttrib-24 {float: left;}*/
#wAttrib-21, #wAttrib-22, #wAttrib-23, #wAttrib-24 {float: left;}
#wAttrib-25 {clear: left; /*float: left;*/}/*this will sit on a new line*/
#wAttrib-26, #wAttrib-27, #wAttrib-28, #wAttrib-29 {float: left;}
Tried that. Won't work.
This is something what I want:
http://www.i-contacts.co.nz/shopping...8093d77ad9bbd4
It is done in zen-cart. Had email the store to ask for help but no reply.
Anyway. I've found a way to so the problem. This is what i did:
/*attribute layout*/
.wrapperAttribsOptions label {font-size: 1.0em;}/*make "label" elements match other text*/
h3#attribsOptionsText {display: none;}/*'Display: None;' to 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*/
/*This line aligns all Right Eye attributes in one roll(first roll)*/
#wAttrib-20, #wAttrib-21, #wAttrib-22, #wAttrib-23, #wAttrib-24 {float: left;}
/*#wAttrib-21, #wAttrib-22, #wAttrib-23, #wAttrib-24 {float: left;}*/
/*For some unknown freak reason that I can't get Attributes 25, 26, 27, 28 and 29 line up all together the next roll,
I created Attribute 30 to do a 'roll break'.*/
#wAttrib-30 {clear: left;}/*this will sit on a new line*/
#wAttrib-30 .attribsOptions {display: none;}/*for a read-only attribute to hide all but comments*/
/*This line aligns all Left Eye attributes in another roll(second roll)*/
#wAttrib-25, #wAttrib-26, #wAttrib-27, #wAttrib-28, #wAttrib-29 {float: left;}
/*Aline Dropdown Box Below Attribute's OptionName*/
#wAttrib-20 .back {float: none;}, #wAttrib-21 .back {float: none;}, #wAttrib-22 .back {float: none;}, #wAttrib-23 .back {float: none;},
#wAttrib-24 .back {float: none;}, #wAttrib-25 .back {float: none;}, #wAttrib-26 .back {float: none;}, #wAttrib-27 .back {float: none;},
#wAttrib-28 .back {float: none;}, #wAttrib-29 .back {float: none;}
/**EOF**/
This is the result:
http://cplens.com/index.php?main_pag...3755054f1b3f45
Now, I need to align the attributes so that they look uniform like in an army squard.
I need to put a "heading" for the attributes so that it looks like this:
1st Row: (Blank Space) QTY PWR BC DIA
2nd Row: Right Eye [ ] [ ] [ ] [ ] <-- drop down boxes for items mentioned in first roll.
3rd Row: Left Eye [ ] [ ] [ ] [ ]
Also, I need to add up RE and LE's QTY so that they can be total up in the shopping cart quantity box. Any suggestion please?
Thank you.
-
Re: Flexible Attributes support
I managed to solve the horizontal alignment issue.
This is what I did:
/*attribute layout*/
.wrapperAttribsOptions label {font-size: 1.0em;}/*make "label" elements match other text*/
h3#attribsOptionsText {display: none;}/*'Display: None;' to 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*/
/*Blank space above 'Right Eye, RE(OD)' Attribute.*/
#wAttrib-35 {clear: left;}/*this will sit on a new line*/
#wAttrib-35 .attribsOptions {display: none;}/*for a read-only attribute to hide all but comments*/
/*This line aligns all attributes' discription in one roll(first roll)*/
#wAttrib-35 {float: left; width: 12em;} /*This line ensures 'Right Eye, RE(OD)' is displayed with enough column width.*/
#wAttrib-36, #wAttrib-37, #wAttrib-38, #wAttrib-38, #wAttrib-39, #wAttrib-40, #wAttrib-41 {float: left; width: 7em;}
/*This line aligns all Right Eye attributes in one roll(second roll)*/
#wAttrib-20 {float: left; width: 12em;} /*This line ensures 'Right Eye, RE(OD)' is displayed with enough column width.*/
#wAttrib-21, #wAttrib-22, #wAttrib-23, #wAttrib-24, #wAttrib-31, #wAttrib-32 {float: left; width: 7em;}
/*For some unknown freak reason that I can't get Attributes 25, 26, 27, 28 and 29 line up all together the next roll,
I created Attribute 30 to do a 'roll break'.*/
#wAttrib-30 {clear: left;}/*this will sit on a new line*/
#wAttrib-30 .attribsOptions {display: none;}/*for a read-only attribute to hide all but comments*/
/*This line aligns all Left Eye attributes in one roll(third roll)*/
#wAttrib-25 {float: left; width: 12em;} /*This line ensures 'Left Eye, LE(OS)' is displayed with enough column width.*/
#wAttrib-26, #wAttrib-27, #wAttrib-28, #wAttrib-29 ,#wAttrib-33, #wAttrib-34 {float: left; width: 7em;}
/*Align Dropdown Box Below Attribute's OptionName*/
/**
#wAttrib-20 .back {float: none;}, #wAttrib-21 .back {float: none;}, #wAttrib-22 .back {float: none;}, #wAttrib-23 .back {float: none;},
#wAttrib-24 .back {float: none;}, #wAttrib-25 .back {float: none;}, #wAttrib-26 .back {float: none;}, #wAttrib-27 .back {float: none;},
#wAttrib-28 .back {float: none;}, #wAttrib-29 .back {float: none;}
**/
/*Sizing comments above Right Eye and Left Eye attributes to bold text with 1em text size*/
#wAttrib-20, #wAttrib-25 h3 {font-size: 1em; font-weight: bold;}
/*Eliminate attributes' option name (other than 'Righte Eye' and 'Left Eye')*/
#wAttrib-21 h4 {display: none;}, #wAttrib-22 h4 {display: none;}, #wAttrib-23 h4 {display: none;}, #wAttrib-24 h4 {display: none;},
#wAttrib-26 h4 {display: none;}, #wAttrib-27 h4 {display: none;}, #wAttrib-28 h4 {display: none;}, #wAttrib-29 h4 {display: none;},
#wAttrib-31 h4 {display: none;}, #wAttrib-32 h4 {display: none;}, #wAttrib-33 h4 {display: none;}, #wAttrib-34 h4 {display: none;}
/**EOF**/
This is the result:
http://cplens.com/index.php?main_pag...3755054f1b3f45
Now I need to add both RE's QTY and LE's QTY to Shopping Cart's QTY total. Can anyone direct me to a forum discussion that address this issue please?
Thanks.
-
Re: Flexible Attributes support
To hide the legend above each dropdown, you can do something like this:
#wAttrib-26 h4 {display: none;}
To add the quantities will take custom coding; only javascript can do it in real time so the customer sees the total change before adding to cart.
The site you mentioned uses a custom-coded table with the attributes inserted into cells, and javascript for a bunch of custom-coded features. It is a job for an experienced javascript developer.
That's why one of the dropdowns was missing its legend when I looked at it - you were in the process of doing what I was about to advise:)
-
Re: Flexible Attributes support
If you read my reply on this post earlier I gave you a pretty good setup to go with for the attributes, including positioning and such, I did the same thing a few days ago.
Quote:
Now I need to add both RE's QTY and LE's QTY to Shopping Cart's QTY total. Can anyone direct me to a forum discussion that address this issue please?
You need to make all of your products priced by attribute, and build a product template to apply price factoring values for the two qty fields (That's how I did it anyway). In my case I also made the base price a hidden read only attribute.
The next issue after adding all the attributes, is probably server load. I've found that the queries go through the roof. You seem to have a good load speed so far... what host are you on?
http://opticalnow.ca/index.php?main_...products_id=10
-
Re: Flexible Attributes support
I would advise taking the value "-" out of cyl and axis, so they can be suppressed, and not show up unless they are needed.
My site has horrible load times at the moment but you can see that I've done most of this already over the last few weeks. If I can help, I will. Also, check the thread over here to get more on topic.
:lamo:
-
Re: Flexible Attributes support
Quote:
Originally Posted by
thedjphat
If you read my reply on this post earlier I gave you a pretty good setup to go with for the attributes, including positioning and such, I did the same thing a few days ago.
You need to make all of your products
priced by attribute, and build a
product template to apply price factoring values for the two qty fields (That's how I did it anyway). In my case I also made the base price a hidden read only attribute.
The next issue after adding all the attributes, is probably server load. I've found that the queries go through the roof. You seem to have a good load speed so far... what host are you on?
http://opticalnow.ca/index.php?main_...products_id=10
opps! din pay attention to your post earlier. :p
anyway, i saw your site. i had tried adding up the price by attributes before. honestly, i have no problem with doing that but there is one problem: the QTY displayed in the shopping cart is always 1 -- no matter how many boxes or quantity we (the customers) declared for our order in the product info page.
Hence, if we (the website designers, ie, you and I) are going to use the option of adding up price by attributes, we have to get rid of the QTY display inside the shopping cart. Off hand, I dunno where or how to do it. :(
I had learn progamming in my computer games design and development diploma earlier (DarkBASIC) and if I am not wrong, the attributes values are "Text" where as the value for the QTY in the Shopping Cart is "Numbers" -- and they are not linked.
If I know where is the code that adds up the shopping cart quantity total and the code for my customed attributes (QTY) are physically written, I may be able to link them like this (somthing like this):
ShoppingCart_QTY = Attrib_QTY(RE) + Attrib_QTY(LE) /*names for each element in the formula is not the real names declared in the real script*/
Unfortunately, I do not know where the codes are physically written.
And yes, I do not know javascript... T_T
I am using hawkhost.
-
Re: Flexible Attributes support
Quote:
Originally Posted by
thedjphat
I would advise taking the value "-" out of cyl and axis, so they can be suppressed, and not show up unless they are needed.
My site has horrible load times at the moment but you can see that I've done most of this already over the last few weeks. If I can help, I will. Also, check the thread
over here to get more on topic.
:lamo:
Based on my php coding knowledge, which is ZERO, it leaves me to no choice as I have to keep my option names and values to the minimal to avoid future confusion and simplicity for creating future product info pages. :(
-
Re: Flexible Attributes support
Quote:
Originally Posted by
windchaser
I managed to solve the horizontal alignment issue.
This is what I did:
/*attribute layout*/
.wrapperAttribsOptions label {font-size: 1.0em;}/*make "label" elements match other text*/
h3#attribsOptionsText {display: none;}/*'Display: None;' to 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*/
/*Blank space above 'Right Eye, RE(OD)' Attribute.*/
#wAttrib-35 {clear: left;}/*this will sit on a new line*/
#wAttrib-35 .attribsOptions {display: none;}/*for a read-only attribute to hide all but comments*/
/*This line aligns all attributes' discription in one roll(first roll)*/
#wAttrib-35 {float: left; width: 12em;} /*This line ensures 'Right Eye, RE(OD)' is displayed with enough column width.*/
#wAttrib-36, #wAttrib-37, #wAttrib-38, #wAttrib-38, #wAttrib-39, #wAttrib-40, #wAttrib-41 {float: left; width: 7em;}
/*This line aligns all Right Eye attributes in one roll(second roll)*/
#wAttrib-20 {float: left; width: 12em;} /*This line ensures 'Right Eye, RE(OD)' is displayed with enough column width.*/
#wAttrib-21, #wAttrib-22, #wAttrib-23, #wAttrib-24, #wAttrib-31, #wAttrib-32 {float: left; width: 7em;}
/*For some unknown freak reason that I can't get Attributes 25, 26, 27, 28 and 29 line up all together the next roll,
I created Attribute 30 to do a 'roll break'.*/
#wAttrib-30 {clear: left;}/*this will sit on a new line*/
#wAttrib-30 .attribsOptions {display: none;}/*for a read-only attribute to hide all but comments*/
/*This line aligns all Left Eye attributes in one roll(third roll)*/
#wAttrib-25 {float: left; width: 12em;} /*This line ensures 'Left Eye, LE(OS)' is displayed with enough column width.*/
#wAttrib-26, #wAttrib-27, #wAttrib-28, #wAttrib-29 ,#wAttrib-33, #wAttrib-34 {float: left; width: 7em;}
/*Align Dropdown Box Below Attribute's OptionName*/
/**
#wAttrib-20 .back {float: none;}, #wAttrib-21 .back {float: none;}, #wAttrib-22 .back {float: none;}, #wAttrib-23 .back {float: none;},
#wAttrib-24 .back {float: none;}, #wAttrib-25 .back {float: none;}, #wAttrib-26 .back {float: none;}, #wAttrib-27 .back {float: none;},
#wAttrib-28 .back {float: none;}, #wAttrib-29 .back {float: none;}
**/
/*Sizing comments above Right Eye and Left Eye attributes to bold text with 1em text size*/
#wAttrib-20, #wAttrib-25 h3 {font-size: 1em; font-weight: bold;}
/*Eliminate attributes' option name (other than 'Righte Eye' and 'Left Eye')*/
#wAttrib-21 h4 {display: none;}, #wAttrib-22 h4 {display: none;}, #wAttrib-23 h4 {display: none;}, #wAttrib-24 h4 {display: none;},
#wAttrib-26 h4 {display: none;}, #wAttrib-27 h4 {display: none;}, #wAttrib-28 h4 {display: none;}, #wAttrib-29 h4 {display: none;},
#wAttrib-31 h4 {display: none;}, #wAttrib-32 h4 {display: none;}, #wAttrib-33 h4 {display: none;}, #wAttrib-34 h4 {display: none;}
/**EOF**/
This is the result:
http://cplens.com/index.php?main_pag...3755054f1b3f45
Now I need to add both RE's QTY and LE's QTY to Shopping Cart's QTY total. Can anyone direct me to a forum discussion that address this issue please?
Thanks.
Oh yar. For people who wonder what is Attribute 30 and 35, they are actually 'Blank Space 002' and 'Blank Space 001' respectively, which I further hide their Option Name discription using the script provided in the module.
I did this after some trial and error with the earlier version of my script and found out how to by pass the bug (if it is, or whatsoever freak reason that what supposed to be joint together in one roll are not).
The 4 lines (2 lines for each blank space) is written base on the rule -- Visual Arts is all about visual illusion.
If we can't get the expected visual result in one solution, use another -- so long it looks what it supposed to looks like!
Cheers! :D
-
Re: Flexible Attributes support
... oh yes, i also need to convert values for Attrib_QTY(RE) and Attrib_QTY(LE) from TEXT to Numbers -- which, of course, I do not know how it is to be done in php! T.T...
-
Re: Flexible Attributes support
It seems you have complicated the layout elements quite a bit to get back to something like the layout you had before, with two rows (not "rolls") of attribute dropdowns... but if it works now, maybe better not to try to fix it more.
Specifically, #wAttrib-20 and #wAttrib-25 no longer have the clear: left; that made them start on new lines, so you introduced new attributes with a bunch of styling to do the job.
There is a PHP operator called (int) that you can put before a variable to cast its type to an integer.
$variable = (int)$variable_old;
This would convert text numerals to a numeric value.
As for where to apply it, I haven't explored that part of the code to be able to advise.
-
Re: Flexible Attributes support
Quote:
Originally Posted by
windchaser
... oh yes, i also need to convert values for Attrib_QTY(RE) and Attrib_QTY(LE) from TEXT to Numbers -- which, of course, I do not know how it is to be done in php! T.T...
No need. the text is just the English description value, the price factor is added to the value in another field.
http://www.zen-cart.com/forum/showth...177#post970177
the last few posts of this thread will show you how to set your products to suppress the quantity box via the catalog.
You will find however, that the attribute set made for quantity has to be plugged into each product with a template, as the price factors don't stay the way they are set unless doing it this way. (correct me if I'm wrong folks)
-
Re: Flexible Attributes support
Please keep your posts about contact lenses directed to the correct thread, I made one for this purpose.
Oh, and THANKS TO YOU! developers and maintainers of the flexible attributes mods, and also to gjh42 personally for all the brain food ;)
-
Re: Flexible Attributes support
Quote:
Originally Posted by
thedjphat
No need. the text is just the English description value, the price factor is added to the value in another field.
http://www.zen-cart.com/forum/showth...177#post970177
the last few posts of this thread will show you how to set your products to suppress the quantity box via the catalog.
You will find however, that the attribute set made for quantity has to be plugged into each product with a template, as the price factors don't stay the way they are set unless doing it this way. (correct me if I'm wrong folks)
Can elaborate more about the term "suppress", please.
I had tried add on the Product Attribute Grd Module after our coversation in the forum last night but not only it didn't produce what I want, it actually made all my attributes line up in one column again!:blink:
Had to revert it back. Lucky I backup the two affecting php files!
Anyway, I also found this morning that what I saw "good" in Maxon Internet Browser (my default browser) is actually not so good in IE!
Had to redo part of my script also. :(
It looks fine now in IE now.
My problem still lies on getting the quanty attributes to add up to the shopping cart quantity total. Will go and see the thread you mentioned. Thanks.
I will however, when everthing is done nicely, going to paste a SOP (Standard Operation Procedure) of how to get this contact lense attributes line up and add up thing onto this thread as well as the other two threads ('two products on in product page' and 'Zen-Cart for contect lenses'), so that others (new comers) will have less pain finding solution for these issues -- a token appreciation for all help given to me in getting this thing done!:smile:
-
Re: Flexible Attributes support
Just downloaded this for use with 1.3.9h - any chance of a summary of the edits needed for compatability, I spotted a couple reading through the thread and dont want to miss any.
Thanks in advance
-
Re: Flexible Attributes support
Posts 21 and 33 above both refer to the same changed file (/includes/modules/attributes.php), and describe different paths to the same edits to update it. The change is only for PHP5.3 compatibility.
-
Re: Flexible Attributes support
Thanks for that, I don't need the edits as i am on 5.2.9.
I was able to use this add-in to resolve what I consider a bug in the layout when using a 'read-only' attribute - the attribute name and read-only text content are out of horiziontal alignment by about 0.5em.
-
1 Attachment(s)
Re: Flexible Attributes support
this mod is so great !!!!!!!!!!
could i add border ? (plese check the image below)
-
Re: Flexible Attributes support
A single border as you show would require that there be one element enclosing those two attributes. That would require a bunch of custom coding and manual settings for attribute ids.
You could make a top/left/bottom border for the 14ky and a top/right/bottom border for the 14kw, and give them both fixed heights so they would match up.
-
Re: Flexible Attributes support
Hi,
This is a great mod! I'm not sure if this is possible though. Can I move the position of my attribute comments to underneath (and right aligned) with the attribute label?
I've tried using padding, or even relative positioning but that does not allow space for the actual text/comments to be dropped in and can overwrite what is there.
What is the best way to move the comments left and under my attributes? Here's my product page where I need it done:
http://www.thedreamtime.com/store/in...roducts_id=182
Thanks,
-Brett
-
1 Attachment(s)
Re: Flexible Attributes support
Hi,
This is a great mod! I'm not sure if this is possible though. Can I move the position of my attribute comments to underneath (and right aligned) with the attribute label?
I've tried using padding, or even relative positioning but that does not allow space for the actual text/comments to be dropped in and can overwrite what is there.
What is the best way to move the comments left and under my attributes? Here's my product page where I need it done:
http://www.thedreamtime.com/store/in...roducts_id=182
You can see from this image what I'm trying to achieve (the red text next to each label is how I would like the comments to appear).
Thanks,
-Brett
-
Re: Flexible Attributes support
Your image is a little hard to see.. Maybe Glenn can help you without it, but in case he can't see it either suggest using Tiny Pic (tinypic . com) to upload your image and posting the forum image code instead..
Quote:
Originally Posted by
BrettBGS
Hi,
This is a great mod! I'm not sure if this is possible though. Can I move the position of my attribute comments to underneath (and right aligned) with the attribute label?
I've tried using padding, or even relative positioning but that does not allow space for the actual text/comments to be dropped in and can overwrite what is there.
What is the best way to move the comments left and under my attributes? Here's my product page where I need it done:
http://www.thedreamtime.com/store/in...roducts_id=182
You can see from this image what I'm trying to achieve (the red text next to each label is how I would like the comments to appear).
Thanks,
-Brett
-
Re: Flexible Attributes support
At a glance, it might be possible to get the layout you want from the mod as is, but more likely you would need to change the comment so it appears after the attribute (there is non-functional code for this in the standard attribute file.)
I have to run, but may be able to look at this late tonight or tomorrow.
-
Re: Flexible Attributes support
Hi,
I've updated the image using tinypic (see it attached)... It's the RED text in this image (that appears under the labels in the picture) that I'm trying to duplicate - another way of doing it would be to display the comments underneath, or to the side of the attribute, rather than the standard of placing it above the attribute.
Glenn - I believe you are the author of Flexible Attributes, my kudos... and a few questions below...
Quote:
Originally Posted by
gjh42
At a glance, it might be possible to get the layout you want from the mod as is, but more likely you would need to change the comment so it appears after the attribute (there is non-functional code for this in the standard attribute file.)
I have to run, but may be able to look at this late tonight or tomorrow.
1.) Any chance that there is a way to do this with CSS using Flexible Attributes?
2.) You say I could change the attribute to display the comment after the attribute. Where would I make this change?
3.) Regarding your own website, I saw the link at the beginning of this thread and had a look. Excellent - and in fact I may have a need to do what you've done as well. From what I see though I'm trying to understand, have you modified the cart completely to look like your website, or have you embedded a Product into your website? I've done this previously with Miva Cart and I am moving to ZenCart I am looking to find a way to do this as well. With Miva I used to embed the Product into any page on my site (using a template that displayed the page as if it were another page on my website, then embedding the product attributes and the form to let the user 'Add To Cart').
So, I'm curious how you did this on your website (http://www.nyfaeriefest.com/) with the Artist Vendor Application? Is your cart setup to look like the site, or have you embedded the product into one of the site's pages?
Thanks in advance,
-Brett
-
Re: Flexible Attributes support
Quote:
have you modified the cart completely to look like your website, or have you embedded a Product into your website?
Neither - the entire site is Zen Cart. This is an example of how the template can be modified, and without major code changes in this instance. Most of the site pages are ez-pages, while the application and registration/payment pages are products.
-
Re: Flexible Attributes support
Hi,
Quote:
Originally Posted by
gjh42
Neither - the entire site is Zen Cart. This is an example of how the template can be modified, and without major code changes in this instance. Most of the site pages are ez-pages, while the application and registration/payment pages are products.
I do see that now. I wonder though, is there some advantage to doing that, over just using the cart on pages requiring payments?
Regarding Flexible Attributes (from my a few posts back):
--
1.) Any chance that there is a way to do this with CSS using Flexible Attributes?
2.) You say I could change the attribute to display the comment after the attribute. Where would I make this change?
--
Thanks,
-Brett
-
Re: Flexible Attributes support
To move the comment text from above the name to below it, find these sections in tpl_modules_attributes.php
PHP Code:
<?php
if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {
?>
<h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3>
<?php
}
?>
(bunch of code)
<?php if ($options_comment[$i] != '' and $options_comment_position[$i] == '1') { ?>
<div class="ProductInfoComments"><?php echo $options_comment[$i]; ?></div>
<?php } ?>
and switch the
== '0')
and
== '1')
PHP Code:
<?php
if ($options_comment[$i] != '' and $options_comment_position[$i] == '1') {
?>
<h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3>
<?php
}
?>
(bunch of code)
<?php if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') { ?>
<div class="ProductInfoComments"><?php echo $options_comment[$i]; ?></div>
<?php } ?>
-
Re: Flexible Attributes support
Quote:
is there some advantage to doing that, over just using the cart on pages requiring payments?
I only had to build the site once, with navigation and different page content all handled using stock Zen Cart functions like the ez-pages sidebox menu and the ez-page content editing system.
-
Re: Flexible Attributes support
Hi,
Thanks that helped. I also removed this code, the last in the attribsOptions DIV to get place the comments text immediately after the attribute:
Code:
<br class="clearBoth" />
I added the <br> back in like this in options_comment... last block, like this, after swapping places with the 0 and 1 as you suggested:
Code:
<?php if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') { ?>
<div class="ProductInfoComments"><?php echo $options_comment[$i]; ?></div>
<br class="clearBoth" />
<?php } else { ?>
<br class="clearBoth" />
<?php } ?>
</div>
Thanks,
-Brett
-
Re: remove br with css
I have
Code:
<div class="wrapperAttribsOptions" id="wAttrib-8">
<div class="attribsOptions">
<h4 class="optionName back">Available Dates :</h4>
<div class="back">
<input type="radio" name="id[8]" value="13" checked="checked" id="attrib-8-13" /><label class="attribsRadioButton zero" for="attrib-8-13">Please select (dd/mm/yyyy)</label><br />
<input type="radio" name="id[8]" value="14" id="attrib-8-14" /><label class="attribsRadioButton zero" for="attrib-8-14">01/05/2011</label><br />
I want display:none for the <br /> on the radio buttons in this attribute only. This is the first step in trying to get the radio buttons to appear in columns (there are 18 of them).I tried both of the following
Code:
#wAttrib-8 .back+br {display:none}
#wAttrib-8 .attribsOptions.back+br {display:none}
that didnt work - clearly I havent fully understood something
can anyone help out please:blush:
-
Re: remove br with css
Add to your stylesheet_flexible_attributes
#wAttrib-8 br+input+label+br {display:none;}
-
Re: Flexible Attributes support
Thanks - now I'll have a go at getting the colums better spaced.
I dont understand why it is 'br+input+label+br'
perhaps you could enlighten me please.
-
Re: Flexible Attributes support
:(:(
Initially I had all radio buttons in a single column to the right of the 'available dates' name.
I used your mod to override the 'br' - and found IE and FF respond differently.
IE leaves all the radio buttons in a block to the right of the attribute name.
FF moves all the radio buttons to the left under the attribute name, still all in a block:ohmy:
This can be seen athttp://www.freight-stop-shop.co.uk/t...products_id=83
I prefer the FF layout, with that there is the room I need for 6 columns - which is what I am trying to achieve.
I tried to give the 'label' items a 'width' (also tried 'min-width'), in order to get 6 radio buttons per line but that had no effect.
I tried to override the override in order to get a 'br' after every 6radio buttons that didnt work
I currently have the following css.
Code:
#wAttrib-8 .optionName {margin-top: -0.2em; margin-right: 4.5em;} /* note aligns text with label */
#wAttrib-8 br+input+label+br {clear:both; display:none;} /* takes out <br /> and makes buttons next o each other */
/* #attrib-8-13 {display: none;} note hides the radio button on the first one */
#wAttrib-8 input+label {width:10em; background:yellow;} /* make the columns the same width */
#attrib-8-19+label+br {display:block; } /* turn <br /> on again */
After a couple of hours trying - nuff :wacko:- time for a beer.
ANy help for a depressed old man would be appreciated.
-
Re: Flexible Attributes support
I don't know how much I can help with IE CSS bugfixing... which version of IE are you using? I have to run now - will check back in a day or two.
-
Re: Flexible Attributes support
br+input+label+br
This means "a break following a label following an input following a break". The first br is there so that the radiobuttons don't ride up next to the first "select" label.
Add !important to your stylesheet to force this rule to overrule the generic one:
#attrib-8-19+label+br {display:block !important; } /* turn <br /> on again */
-
Re: Flexible Attributes support
Thanks for the explanation.
After a lot of trying I failed to find a way with the classess and ids available to get the layout I wanted.
In the end I saved the served page locally and messed with it until I found a way to get it to work. Take a look at
http://www.freight-stop-shop.co.uk/t...products_id=83
I found that the simplest solution was to add
Code:
<div id="....">........</div> around each radio button.
I did this by hacking the code in attributes.php as follows
Code:
switch ($products_options_names->fields['products_options_images_style']) {
case '0':
$tmp_radio .= '<div id="wDivAttrib-'.$products_options_names->fields['products_options_id'] . '-' . $products_options_value_id.'" >'.zen_draw_radio_field('id[' . $products_options_names->fields['products_options_id'] . ']', $products_options_value_id, $selected_attribute, 'id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '"') . '<label class="attribsRadioButton zero" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . $products_options_details . '</label><br /></div>' . "\n";
break;
case '1':
$tmp_radio .= '<div id="wDivAttrib-'.$products_options_names->fields['products_options_id'] . '-' . $products_options_value_id.'" >'.zen_draw_radio_field('id[' . $products_options_names->fields['products_options_id'] . ']', $products_options_value_id, $selected_attribute, 'id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '"') . '<label class="attribsRadioButton one" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . ($products_options->fields['attributes_image'] != '' ? zen_image(DIR_WS_IMAGES . $products_options->fields['attributes_image'], '', '', '' ) . ' ' : '') . $products_options_details . '</label><br /></div>' . "\n";
break;
case '2':
$tmp_radio .= '<div id="wDivAttrib-'.$products_options_names->fields['products_options_id'] . '-' . $products_options_value_id.'" >'.zen_draw_radio_field('id[' . $products_options_names->fields['products_options_id'] . ']', $products_options_value_id, $selected_attribute, 'id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '"') . '<label class="attribsRadioButton two" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . $products_options_details . ($products_options->fields['attributes_image'] != '' ? '<br />' . zen_image(DIR_WS_IMAGES . $products_options->fields['attributes_image'], '', '', '' ) : '') . '</label><br /></div>' . "\n";
break;
this abt line 232 - what do you think - can you see any problems with that?
I then used the following CSS
Code:
#attrib-8-13{display: none;} /* note hides the radio button on the first one */
/* March */
#wDivAttrib-8-14,#wDivAttrib-8-15,#wDivAttrib-8-16,#wDivAttrib-8-17,#wDivAttrib-8-18,#wDivAttrib-8-19 {
width:8.5em; float:left; }
(some lines omitted - duplicates of above for other buttons)
/* First day in month - to start on new line */
#wDivAttrib-8-14,#wDivAttrib-8-20,#wDivAttrib-8-26,#wDivAttrib-8-32,#wDivAttrib-8-38,#wDivAttrib-8-44,#wDivAttrib-8-50 {
clear:both; }
It looks greate in FF and in IE 9 (64bit) under Win 7(64bit)
but on IE9 (32 bit) under win 7 (32bit) its a bit odd - although on XP with IE 8 its fine.
I would appreciate some feedback on how it appears for other users. It should be multiple columns across the whole width. On my odd on it is every button next to the previous in the right hand half of the window.
-
Re: Flexible Attributes support
Just booted my wifes computer WIn7(32bit) + IE9(32bit) - looks OK on that one - weird - probably one of the addons I have interfering.
-
Re: Flexible Attributes support
Turning on 'compatibility view' in my IE9 fixed it - dont know why it is required.
This may mean that the code hack wasnt required - however
adding the div wrapper made the CSS so much cleaner and simpler.
-
Re: Flexible Attributes support
I don't know why you couldn't make it work. The rule described in post 95 made it work exactly as desired when I tested it on your site in Firefox Web Developer, starting a new line after attribute 8-19.
-
Re: Flexible Attributes support
Indeed it did, but not in IE (at least not on the pc Iwas using). As I said turning on compatibility mode resolved some isues and may have made the code hack unnecessary. However since discovering that turning compatibility on helped I havent taken the step of going bac to pre-hack
The CSS for post-hack is much simpler, there being no need for the long '+' sequences and no need to turn br off and on again.
I just hid one div to hide the first entry, and added the float and clear to the divs to get entries alongside or on a new line.
I could not find a way of getting the width of the button+label defined even in FF, pre-hack but again this was easy with the new divs post hack.
-
Re: Flexible Attributes support
Ok - I have taken the time to go back to pre-hack.
The website now - should you care to look - uses the following css
Code:
#wAttrib-8 .optionName {margin-top: -0.2em; margin-right: 4.5em;} /* note aligns text with label */
#wAttrib-8 br {display:none;} /*turn off All br on this set of buttons */
#attrib-8-13, #attrib-8-13+label {display:none;} /* hide first button and label */
#attrib-8-13+label+br {display:block !important; } /* turn this br on again */
#attrib-8-30+label+br {display:block !important; } /* turn this br on again */
#attrib-8-34+label+br {display:block !important; } /* turn this br on again */
#attrib-8-41+label+br {display:block !important; } /* turn this br on again */
#attrib-8-46+label+br {display:block !important; } /* turn this br on again */
It works - almost - I cannot find a way to align the buttons for equal column width the 'label' does not seem to respond to 'width'settings.
It is the same in both FF and IE.