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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helior’s picture

Category: bug » feature
Priority: Major » Normal
Status: Active » Needs review
FileSize
4.01 KB

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
FileSize
3.51 KB

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.