Hi people, i notice that wrappers of fields are always printed, even if it has no value. This cause themeing issues, since div exists.
I know there might be an issue, since if i switch to a second color, this one might have a value while the other does not. But it would be very helpfull to have, at least, an extra class on empty wrapper.....like "empty".
Then it would be solve like -> div.commerce-product-field.empty {display: none;}

thanks for everything.

Files: 
CommentFileSizeAuthor
#5 empty-product-field-classes-1570058-5.patch3.51 KBvasike
PASSED: [[SimpleTest]]: [MySQL] 3,589 pass(es).
[ View ]
#1 empty-product-field-classes-1570058-1.patch4.01 KBhelior
PASSED: [[SimpleTest]]: [MySQL] 3,567 pass(es).
[ View ]

Comments

Category:bug» feature
Priority:Major» Normal
Status:Active» Needs review
StatusFileSize
new4.01 KB
PASSED: [[SimpleTest]]: [MySQL] 3,567 pass(es).
[ View ]

These wrapping divs are always rendered because they are actually necessary for dynamic value replacement – say, when you switch your color attribute. It would be nice however to have some context as to when the product field is empty, as you described for CSS purposes.

Excellent helior, it works perfect. Many thanks for this patch and this module =)

has no success patching.
#1: empty-product-field-classes-1570058-1.patch queued for re-testing.

actually i tried patching against the dev version

Version:7.x-1.3» 7.x-1.x-dev
StatusFileSize
new3.51 KB
PASSED: [[SimpleTest]]: [MySQL] 3,589 pass(es).
[ View ]

changed version and recreate the patch. it seems it's working

Status:Needs review» Reviewed & tested by the community

Component:Product» Product reference
Status:Reviewed & tested by the community» Fixed

Trimmed a little from the patch and committed! Thanks.

Commit: http://drupalcode.org/project/commerce.git/commitdiff/c98eca8

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.