Skip to content

Commit 8e16f36

Browse files
author
Olexii Korshenko
committed
Merge branch 'checkout_stabilization' into checkout
2 parents be391d6 + 4c78f61 commit 8e16f36

File tree

60 files changed

+296
-262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+296
-262
lines changed

app/code/Magento/Checkout/Block/Cart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function isWishlistActive()
144144
*/
145145
public function getCheckoutUrl()
146146
{
147-
return $this->getUrl('checkout/onepage', ['_secure' => true]);
147+
return $this->getUrl('checkout', ['_secure' => true]);
148148
}
149149

150150
/**

app/code/Magento/Checkout/Block/Cart/Sidebar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function getImageHtmlTemplate()
8888
*/
8989
public function getCheckoutUrl()
9090
{
91-
return $this->getUrl('checkout/onepage');
91+
return $this->getUrl('checkout');
9292
}
9393

9494
/**

app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function process($jsLayout)
4848
/** @var \Magento\Eav\Api\Data\AttributeInterface[] $attributes */
4949
$attributes = $this->attributeMetadataDataProvider->loadAttributesCollection(
5050
'customer_address',
51-
'customer_register_address'
51+
'customer_address_edit'
5252
);
5353

5454
$elements = [];
@@ -63,6 +63,12 @@ public function process($jsLayout)
6363
if (isset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
6464
['payment']['children']
6565
)) {
66+
if (!isset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
67+
['payment']['children']['payments-list']['children'])) {
68+
$jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
69+
['payment']['children']['payments-list']['children'] = [];
70+
}
71+
6672
$jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
6773
['payment']['children']['payments-list']['children'] =
6874
array_merge_recursive(
@@ -111,6 +117,7 @@ private function processPaymentConfiguration(array &$configuration, array $eleme
111117
'component' => 'Magento_Checkout/js/view/billing-address',
112118
'displayArea' => 'billing-address-form-' . $paymentCode,
113119
'provider' => 'checkoutProvider',
120+
'deps' => 'checkoutProvider',
114121
'dataScopePrefix' => 'billingAddress' . $paymentCode,
115122
'sortOrder' => 1,
116123
'children' => [

app/code/Magento/Checkout/Block/Onepage/Link.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(
4545
*/
4646
public function getCheckoutUrl()
4747
{
48-
return $this->getUrl('checkout/onepage');
48+
return $this->getUrl('checkout');
4949
}
5050

5151
/**

app/code/Magento/Checkout/Controller/Onepage/Index.php renamed to app/code/Magento/Checkout/Controller/Index/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright © 2015 Magento. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7-
namespace Magento\Checkout\Controller\Onepage;
7+
namespace Magento\Checkout\Controller\Index;
88

99
class Index extends \Magento\Checkout\Controller\Onepage
1010
{

app/code/Magento/Checkout/Controller/Onepage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ protected function _expireAjax()
180180
{
181181
$quote = $this->getOnepage()->getQuote();
182182
if (!$quote->hasItems() || $quote->getHasError() || !$quote->validateMinimumAmount()) {
183-
return false;
183+
return true;
184184
}
185185
$action = $this->getRequest()->getActionName();
186186
if ($this->_objectManager->get('Magento\Checkout\Model\Session')->getCartWasUpdated(true)
187187
&&
188188
!in_array($action, ['index', 'progress'])
189189
) {
190-
return false;
190+
return true;
191191
}
192192

193193
return false;

app/code/Magento/Checkout/Test/Unit/Controller/Onepage/IndexTest.php renamed to app/code/Magento/Checkout/Test/Unit/Controller/Index/IndexTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22
/**
3-
* Test for \Magento\Checkout\Controller\Onepage\Index
3+
* Test for \Magento\Checkout\Controller\Index\Index
44
*
55
* Copyright © 2015 Magento. All rights reserved.
66
* See COPYING.txt for license details.
77
*/
88

9-
namespace Magento\Checkout\Test\Unit\Controller\Onepage;
9+
namespace Magento\Checkout\Test\Unit\Controller\Index;
1010

1111
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManager;
1212

@@ -71,7 +71,7 @@ class IndexTest extends \PHPUnit_Framework_TestCase
7171
private $redirectMock;
7272

7373
/**
74-
* @var \Magento\Checkout\Controller\Onepage\Index
74+
* @var \Magento\Checkout\Controller\Index\Index
7575
*/
7676
private $model;
7777

@@ -171,7 +171,7 @@ public function setUp()
171171

172172
// SUT
173173
$this->model = $this->objectManager->getObject(
174-
'Magento\Checkout\Controller\Onepage\Index',
174+
'Magento\Checkout\Controller\Index\Index',
175175
[
176176
'context' => $this->contextMock,
177177
'customerSession' => $this->sessionMock,

app/code/Magento/Checkout/etc/frontend/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<type name="Magento\Framework\Url\SecurityInfo">
1111
<arguments>
1212
<argument name="secureUrlList" xsi:type="array">
13-
<item name="checkout_onepage" xsi:type="string">/checkout/onepage</item>
13+
<item name="checkout_index" xsi:type="string">/checkout</item>
1414
</argument>
1515
</arguments>
1616
</type>

app/code/Magento/Checkout/etc/frontend/page_types.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<type id="checkout_cart_configure" label="Configure Cart Item (Any)"/>
1010
<type id="checkout_cart_index" label="Shopping Cart"/>
1111
<type id="checkout_onepage_failure" label="One Page Checkout Failure"/>
12-
<type id="checkout_onepage_index" label="One Page Checkout"/>
12+
<type id="checkout_index_index" label="One Page Checkout"/>
1313
<type id="checkout_onepage_paymentmethod" label="One Page Checkout Choose Payment Method"/>
1414
<type id="checkout_onepage_review" label="One Page Checkout Overview"/>
1515
<type id="checkout_onepage_shippingmethod" label="One Page Checkout Choose Shipping Method"/>

0 commit comments

Comments
 (0)