Discussions

[SOLVED]An issue with the style/display of a new variation type field

Hi,

I'm using commerce kickstart 2.0
I have an issue with a field for a new variation type.
I created a variation type called "wallet". It's similar to a "Bag and Cases"
variation type but without the size field.
The problem is when I added a product of that variation type to the
cart.
If you check a bag added to the cart you can see that
the label "Color" is bold and the color name is next to the label.
But when I added a wallet (using my new variation type) the
label "Color" is not bold and the color name is shown below the label.
I want to show my color field in the same way as the "Bag and Cases"
variation type.
I attached an image showing the issue.

Can somebody help me?

Thanks

AttachmentSize
Image icon cart.png68.84 KB
Posted: Feb 19, 2013

Comments

r on February 20, 2013

Check the "Manage Display" of your "Wallet" Product Variation Type:
/admin/commerce/config/product-variation-types/wallet/display

You'll want to be sure that the Color field's Label is set to "Inline" instead of "Above".

realskorpion on February 20, 2013

Thanks a lot r for your response

The Color field's label is set to "inline" as you said.
That's the issue, I don't know why if I specified the color label as "inline"
the label and the the color name are being shown in separated lines.
For some reason drupal commerce is ignoring that.

Thanks

r on February 20, 2013

Good find. There are a couple easier fixes, though, that don't involve modifying or disabling modules...at least "I think" these will work for you:

I was able to reproduce the line break by changing my field's "Wrapper Markup" field (Fences module) from SPAN to DIV. DIV does not want to display inline, while SPAN does just fine. So you can change to SPAN (if it is indeed set to nothing or DIV).

-- OR --

To make DIV behave, another easy fix is to create an .inline CSS class:

.inline { display: inline }