0

Using Drupal 7 with Drupal commerce.

During the checkout in the shipping section I can choose a county from a drop-down list (a string value). However, on the review order phase it is represented as a number (please see attached image). Moreover, it is printed as a number on the order pdf. enter image description here

Any ideas on why is it so?

  • That's a select list. key => value, key => value, key => value. Where 82 is a key. And Valgamaa is a value. So fix your field's display settings (Manage Display) to output the value instead of the key. That's all. – leymannx Jul 2 '18 at 12:30
  • 1
    That doesn't apply in this case, because address field values are a single combined field. Will answer below. The issue here is a missing address format. – Ryan Szrama Jul 2 '18 at 14:28
1

The issue here is common to countries whose administrative areas don't render with abbreviations, which is the case in other countries like the U.S. and Canada where States and Provinces are abbreviated when printed (e.g. SC, NC, TN, etc.). Many of those countries use simple numeric codes or nonsensical alphanumeric codes as an administrative designation but should have the full names of the areas printed for display.

In the Address Field module, we introduced a configuration option for such countries' address formats called render_administrative_area_value that must be set to TRUE to do so. I've opened an issue for Estonia that will also ensure we've done this for the other countries we know about:

https://www.drupal.org/project/addressfield/issues/2983142

I'll have a patch up there shortly. : )

  • 1
    fyi, just committed the patch. Use the latest dev version and your issue will be resolved. – Ryan Szrama Jul 2 '18 at 20:25
  • Happy to help! : ) – Ryan Szrama Jul 3 '18 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.