Hello, which create values for options, there is name|value you can input. IMO, name equals label, and the value should be the key stored for index.

In multilanguage site, the name can been translated and shows in different languages.

While when you input as Name|value, in Extra Fields Checkout Pane, the value get display for review.
When you input as value|name, the value field never be translated.

So there should be someting confusing.

Thanks

Example:

Chicago|chicago, in the Extra Fields Checkout Pane, it display the value chicago instead of Chicago.
chicago|Chicago, Okay now Chicago be displayed, while Chicago can't been searched from translation UI.

Thank you.

Comments

maurizio.ganovelli’s picture

Thanks for reporting the problem. This issue seem to affect also options created with php (ARRAY of key => value): in this case "key" is displayed during checkout, "value" in review.
As soon as possible i'll try to provide a patch.

wqmeng’s picture

Yes, it is, I also tried the php code, both have this problem.

Thank you.

megachriz’s picture

Assigned: Unassigned » megachriz
Status: Active » Needs review

I have committed a fix for this. This were the changes I made:
- Changed behaviour of select fields. Options are now defined as safe_key|label instead of the opposite it was.
- Made options labels translatable with i18n.
- Added Views field handler for selection fields: in Views labels of option values are shown instead of the key.
- Fix for select fields on order edit page: if the saved value isn't available anymore as an option (if for example that option has been deleted), the saved value is now added as an option, so the saved value won't be overwritten when editing the order.

Let me know if this solves the problems with the select fields.

wqmeng’s picture

Use the latest dev version,

All fine now.

Thanks

megachriz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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