Right now you set a default currency for Price fields on the widget settings form, not the field settings form. This means I can have a different default currency for different instances of the same field, which I believe is a good thing. The default after all only governs the default choice of an option list (for the Price + Currency widget) or the unalterable currency of the field (for the Price only widget).

However, I'm not settled here... especially given the fact that widget settings are unalterable for locked fields (like the default base_price field that gets added to every product type).

I don't have any strong inclination to change this right now, but I wanted to log an issue to remember to revisit it and see if anyone else had any thoughts.

Comments

rszrama’s picture

Status: Active » Fixed

Ok, upon review, I think my instinct to keep the setting in the widget settings and not the field setting was correct. The only minor drawback is that changing from one widget type to another means you lose the default currency of that instance of the field, but that's easy to reset and I don't expect it to happen often.

I also added a "- Use default store currency -" option that will always make the field default to the store default. This is important because we're adding locked fields whose widget settings cannot be adjusted. Also, because locked fields cannot have their widget types adjusted, I've changed these locked fields to use the full widget w/ a currency selector (and for usability made that currency selector revert to a text suffix if only one option is available).

I think this will also resolve #893364: Currency not working properly, because our default price fields will now automatically revert to displaying the default store currency instead of continuing to display USD when it's disabled. Both widgets were updated to preserve existing currencies when a currency is disabled that is already in use on products as well (with an appropriate warning message about switching away from a disabled currency).

Commit: http://github.com/rszrama/drupalcommerce/commit/e1e918edf0a8a039e5bdb2fb...

Status: Fixed » Closed (fixed)

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