{"action":"closed","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/6325","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/6325/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/6325/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/6325/events","html_url":"https://github.com/magento/magento2/issues/6325","id":172977207,"number":6325,"title":"It should be possible to sort the billing address fields in the checkout in a convenient way","user":{"login":"hostep","id":85479,"avatar_url":"https://avatars.githubusercontent.com/u/85479?v=3","gravatar_id":"","url":"https://api.github.com/users/hostep","html_url":"https://github.com/hostep","followers_url":"https://api.github.com/users/hostep/followers","following_url":"https://api.github.com/users/hostep/following{/other_user}","gists_url":"https://api.github.com/users/hostep/gists{/gist_id}","starred_url":"https://api.github.com/users/hostep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hostep/subscriptions","organizations_url":"https://api.github.com/users/hostep/orgs","repos_url":"https://api.github.com/users/hostep/repos","events_url":"https://api.github.com/users/hostep/events{/privacy}","received_events_url":"https://api.github.com/users/hostep/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magento/magento2/labels/2.1.x","name":"2.1.x","color":"fbca04"},{"url":"https://api.github.com/repos/magento/magento2/labels/bug%20report","name":"bug report","color":"d93f0b"},{"url":"https://api.github.com/repos/magento/magento2/labels/Customer","name":"Customer","color":"1d76db"},{"url":"https://api.github.com/repos/magento/magento2/labels/improvement","name":"improvement","color":"d93f0b"},{"url":"https://api.github.com/repos/magento/magento2/labels/moved_to_forums","name":"moved_to_forums","color":"e99695"},{"url":"https://api.github.com/repos/magento/magento2/labels/TECH","name":"TECH","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-24T15:05:13Z","updated_at":"2016-09-15T16:11:37Z","closed_at":"2016-09-15T16:11:37Z","body":"### Preconditions\r\n1. Magento CE 2.1.0\r\n2. A whole afternoon of debugging joy (oh no, I already did this for you, don't worry)\r\n\r\n### Steps to reproduce\r\n1. Take a look at how the *billing* address fields are composed: https://github.com/magento/magento2/blob/c5d618d5439362f50ba0f21d3fadf418cc765190/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php#L201-L246\r\n2. Compare this to the *shipping* address fields: https://github.com/magento/magento2/blob/c5d618d5439362f50ba0f21d3fadf418cc765190/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php#L165\r\n\r\n### Expected result\r\nI expected to be able to change the sort order of the *billing* address fields in the checkout using xml or some other \"convenient\" way, but found this is almost impossible without manually altering the `sort_order` field in the `customer_eav_attribute` table.\r\n\r\n### Actual result\r\nNot able to sort the *billing* address fields in a convenient and easy way.\r\n\r\n\r\n### Discussion\r\nTo be able to sort the *shipping* address fields in the checkout, we can create a file `checkout_index_index.xml` with something like this:\r\n```xml\r\n<?xml version=\"1.0\"?>\r\n<page xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" layout=\"checkout\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:View/Layout/etc/page_configuration.xsd\">\r\n    <body>\r\n        <referenceBlock name=\"checkout.root\">\r\n            <arguments>\r\n                <argument name=\"jsLayout\" xsi:type=\"array\">\r\n                    <item name=\"components\" xsi:type=\"array\">\r\n                        <item name=\"checkout\" xsi:type=\"array\">\r\n                            <item name=\"children\" xsi:type=\"array\">\r\n                                <item name=\"steps\" xsi:type=\"array\">\r\n                                    <item name=\"children\" xsi:type=\"array\">\r\n                                        <item name=\"shipping-step\" xsi:type=\"array\">\r\n                                            <item name=\"children\" xsi:type=\"array\">\r\n                                                <item name=\"shippingAddress\" xsi:type=\"array\">\r\n                                                    <item name=\"children\" xsi:type=\"array\">\r\n                                                        <item name=\"shipping-address-fieldset\" xsi:type=\"array\">\r\n                                                            <item name=\"children\" xsi:type=\"array\">\r\n                                                                <item name=\"region_id\" xsi:type=\"array\">\r\n                                                                    <item name=\"sortOrder\" xsi:type=\"string\">87</item>\r\n                                                                </item>\r\n                                                                <item name=\"postcode\" xsi:type=\"array\">\r\n                                                                    <item name=\"sortOrder\" xsi:type=\"string\">80</item>\r\n                                                                </item>\r\n                                                                <item name=\"company\" xsi:type=\"array\">\r\n                                                                    <item name=\"sortOrder\" xsi:type=\"string\">45</item>\r\n                                                                </item>\r\n                                                                <item name=\"vat_id\" xsi:type=\"array\">\r\n                                                                    <item name=\"sortOrder\" xsi:type=\"string\">46</item>\r\n                                                                </item>\r\n                                                                <item name=\"country_id\" xsi:type=\"array\">\r\n                                                                    <item name=\"sortOrder\" xsi:type=\"string\">85</item>\r\n                                                                </item>\r\n                                                                <item name=\"telephone\" xsi:type=\"array\">\r\n                                                                    <item name=\"sortOrder\" xsi:type=\"string\">90</item>\r\n                                                                </item>\r\n                                                            </item>\r\n                                                        </item>\r\n                                                    </item>\r\n                                                </item>\r\n                                            </item>\r\n                                        </item>\r\n                                    </item>\r\n                                </item>\r\n                            </item>\r\n                        </item>\r\n                    </item>\r\n                </argument>\r\n            </arguments>\r\n        </referenceBlock>\r\n    </body>\r\n</page>\r\n```\r\n\r\nI was hoping there was a similar way for the *billing* address fields, but came to the conclusion after viewing https://github.com/magento/magento2/blob/c5d618d5439362f50ba0f21d3fadf418cc765190/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php#L201-L246 this is not possible due to those hardcoded values.\r\n\r\nOr am I missing something obvious here?"}}
{"actor":{"display_login":"piotrekkaminski"}}