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.

#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


helior’s picture

Category: bug » feature
Priority: Major » Normal
Status: Active » Needs review
4.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.

FAAREIA’s picture

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

vasike’s picture

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

vasike’s picture

actually i tried patching against the dev version

vasike’s picture

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

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

vasike’s picture

Status: Needs review » Reviewed & tested by the community
rszrama’s picture

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.