During checkout, even an address is selected for billing, fields (street, zipcode, ...) stay empty. I have to change to another address and come back to the first one to fill the fields.
I made a patch to correct it, can I have some code review please ?


kry_lalala created an issue. See original summary.

Grimreaper’s picture

Status: Active » Needs review


Thanks for the patch. I will just do a code review on standards and process, I have not tested the patch and I didn't know this module before.

In your patch, do not keep commented code like:

//$addr_form = $addr_form_state = array();

If you have modified code because it was not good, just remove it, do not keep the old code commented.

About the issue, when you post a patch, change the issue status to "Needs review". Maybe I should change it to "Needs work" because of my code review but I would like the module maintainer to take a look at your patch.

When posting a patch. Create the issue first so you will have the issue nid to give a standard name to you patch. Example: address_templates-fix_something-2822002-2.patch

See: https://www.drupal.org/patch/submit#patch_naming for more info.

Thanks again for your contribution.

Grimreaper’s picture


I have remade the patch as it is not applyable with git. And so I could not test it on simplytest.me

Grimreaper’s picture

Status: Needs review » Reviewed & tested by the community
11.42 KB

Without the patch, I can confirm the bug and I also had a warning (see attachment).

With the patch, there is no more warning and the feature is working properly. Thanks.

@kry_lalala: please see the documentation page on how to make a patch with git: https://www.drupal.org/node/707484