From 43af65a3f4559993fdc72cc3fbed2f65b7947ddf Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Thu, 2 Jul 2015 16:38:43 +0300 Subject: [PATCH] MAGETWO-39601: New Billing address form displays only for one payment method if it in edit state --- .../Checkout/view/frontend/layout/checkout_index_index.xml | 1 - .../Checkout/view/frontend/web/js/view/billing-address.js | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml index 3a334708e96..f6a5ba13a84 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml @@ -263,7 +263,6 @@ </item> </item> </item> - <!-- TODO: add billing address form --> <item name="beforeMethods" xsi:type="array"> <item name="component" xsi:type="string">uiComponent</item> <item name="displayArea" xsi:type="string">beforeMethods</item> diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js b/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js index 4a060c33fdf..945cd280275 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js @@ -35,6 +35,13 @@ define( template: 'Magento_Checkout/billing-address' }, + initialize: function () { + this._super(); + quote.paymentMethod.subscribe(function() { + this.cancelAddressEdit(); + }, this); + }, + initObservable: function () { this._super() .observe({ -- GitLab