Skip to content

Commit 723d8ad

Browse files
Merge branch 2.3-develop into ENGCOM-4838-magento-magento2-22020
2 parents cb2026c + a562d34 commit 723d8ad

File tree

40 files changed

+848
-680
lines changed

40 files changed

+848
-680
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/payment.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,21 @@ define([
6666
navigate: function () {
6767
var self = this;
6868

69-
getPaymentInformation().done(function () {
70-
self.isVisible(true);
71-
});
69+
if (!self.hasShippingMethod()) {
70+
this.isVisible(false);
71+
stepNavigator.setHash('shipping');
72+
} else {
73+
getPaymentInformation().done(function () {
74+
self.isVisible(true);
75+
});
76+
}
77+
},
78+
79+
/**
80+
* @return {Boolean}
81+
*/
82+
hasShippingMethod: function () {
83+
return window.checkoutConfig.selectedShippingMethod !== null;
7284
},
7385

7486
/**

app/code/Magento/Config/Model/Config/Source/Locale/Currency.php

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/**
8-
* Locale currency source
9-
*/
107
namespace Magento\Config\Model\Config\Source\Locale;
118

9+
use Magento\Framework\App\Config\ScopeConfigInterface;
10+
use Magento\Framework\App\ObjectManager;
11+
use Magento\Framework\Locale\ListsInterface;
12+
1213
/**
14+
* Locale currency source.
15+
*
1316
* @api
1417
* @since 100.0.2
1518
*/
@@ -21,27 +24,70 @@ class Currency implements \Magento\Framework\Option\ArrayInterface
2124
protected $_options;
2225

2326
/**
24-
* @var \Magento\Framework\Locale\ListsInterface
27+
* @var ListsInterface
2528
*/
2629
protected $_localeLists;
2730

2831
/**
29-
* @param \Magento\Framework\Locale\ListsInterface $localeLists
32+
* @var ScopeConfigInterface
3033
*/
31-
public function __construct(\Magento\Framework\Locale\ListsInterface $localeLists)
32-
{
34+
private $config;
35+
36+
/**
37+
* @var array
38+
*/
39+
private $installedCurrencies;
40+
41+
/**
42+
* @param ListsInterface $localeLists
43+
* @param ScopeConfigInterface $config
44+
*/
45+
public function __construct(
46+
ListsInterface $localeLists,
47+
ScopeConfigInterface $config = null
48+
) {
3349
$this->_localeLists = $localeLists;
50+
$this->config = $config ?: ObjectManager::getInstance()->get(ScopeConfigInterface::class);
3451
}
3552

3653
/**
37-
* @return array
54+
* @inheritdoc
3855
*/
3956
public function toOptionArray()
4057
{
4158
if (!$this->_options) {
4259
$this->_options = $this->_localeLists->getOptionCurrencies();
4360
}
44-
$options = $this->_options;
61+
62+
$selected = array_flip($this->getInstalledCurrencies());
63+
64+
$options = array_filter(
65+
$this->_options,
66+
function ($option) use ($selected) {
67+
return isset($selected[$option['value']]);
68+
}
69+
);
70+
4571
return $options;
4672
}
73+
74+
/**
75+
* Retrieve Installed Currencies.
76+
*
77+
* @return array
78+
*/
79+
private function getInstalledCurrencies()
80+
{
81+
if (!$this->installedCurrencies) {
82+
$this->installedCurrencies = explode(
83+
',',
84+
$this->config->getValue(
85+
'system/currency/installed',
86+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
87+
)
88+
);
89+
}
90+
91+
return $this->installedCurrencies;
92+
}
4793
}

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@
5353
<testCaseId value="MC-10930"/>
5454
<group value="catalog"/>
5555
<group value="mtf_migrated"/>
56-
<skip>
57-
<issueId value="MSI-2110"/>
58-
</skip>
5956
</annotations>
6057
<before>
6158
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
@@ -93,10 +90,6 @@
9390
<useCaseId value="MAGETWO-44165"/>
9491
<testCaseId value="MAGETWO-29398"/>
9592
<group value="catalog"/>
96-
<group value="mtf_migrated"/>
97-
<skip>
98-
<issueId value="MSI-2110"/>
99-
</skip>
10093
</annotations>
10194
<before>
10295
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
@@ -139,9 +132,6 @@
139132
<testCaseId value="MAGETWO-29398"/>
140133
<group value="catalog"/>
141134
<group value="mtf_migrated"/>
142-
<skip>
143-
<issueId value="MSI-2110"/>
144-
</skip>
145135
</annotations>
146136
<before>
147137
<createData entity="_defaultCategory" stepKey="createPreReqCategory"/>

app/code/Magento/Customer/Model/Customer/DataProviderWithDefaultAddresses.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class DataProviderWithDefaultAddresses extends \Magento\Ui\DataProvider\Abstract
3939
private static $forbiddenCustomerFields = [
4040
'password_hash',
4141
'rp_token',
42-
'confirmation',
4342
];
4443

4544
/**

app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressesFromActionGroup.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,13 @@
3939
<click selector="{{AdminEditCustomerAddressesSection.defaultBillingAddressButton}}" stepKey="setDefaultBilling" before="setDefaultShipping"/>
4040
<click selector="{{AdminEditCustomerAddressesSection.defaultShippingAddressButton}}" stepKey="setDefaultShipping" before="fillPrefixName"/>
4141
</actionGroup>
42+
<actionGroup name="SelectDropdownCustomerAddressAttributeValueActionGroup">
43+
<arguments>
44+
<argument name="customerAddressAttribute"/>
45+
<argument name="optionValue" type="string"/>
46+
</arguments>
47+
<selectOption selector="{{AdminEditCustomerAddressesSection.dropDownAttribute(customerAddressAttribute.code)}}" userInput="{{optionValue}}" stepKey="selectOptionValue"/>
48+
<click selector="{{AdminEditCustomerAddressesSection.save}}" stepKey="saveAddress"/>
49+
<waitForPageLoad stepKey="waitForAddressSaved"/>
50+
</actionGroup>
4251
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,4 +216,18 @@
216216
<data key="store_id">0</data>
217217
<data key="website_id">0</data>
218218
</entity>
219+
<entity name="Simple_US_Customer_Two_Addresses" type="customer">
220+
<data key="group_id">0</data>
221+
<data key="default_billing">true</data>
222+
<data key="default_shipping">true</data>
223+
<data key="email" unique="prefix">John.Doe@example.com</data>
224+
<data key="firstname">John</data>
225+
<data key="lastname">Doe</data>
226+
<data key="fullname">John Doe</data>
227+
<data key="password">pwdTest123!</data>
228+
<data key="store_id">0</data>
229+
<data key="website_id">0</data>
230+
<requiredEntity type="address">US_Address_TX</requiredEntity>
231+
<requiredEntity type="address">US_Address_NY_Not_Default_Address</requiredEntity>
232+
</entity>
219233
</entities>

app/code/Magento/Customer/Test/Mftf/Section/AdminEditCustomerAddressesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<element name="city" type="text" selector="//*[@class='modal-component']//input[@name='city']" />
2626
<element name="country" type="select" selector="//*[@class='modal-component']//select[@name='country_id']" />
2727
<element name="state" type="select" selector="//*[@class='modal-component']//select[@name='region_id']" />
28+
<element name="dropDownAttribute" type="select" selector="//select[@name='{{var1}}']" parameterized="true"/>
2829
<element name="zipCode" type="text" selector="//*[@class='modal-component']//input[@name='postcode']" />
2930
<element name="phone" type="text" selector="//*[@class='modal-component']//input[@name='telephone']" />
3031
<element name="vat" type="text" selector="input[name='vat_id']" />

app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderWithDefaultAddressesTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ public function testGetData(): void
339339
'default_shipping' => 2,
340340
'password_hash' => 'password_hash',
341341
'rp_token' => 'rp_token',
342-
'confirmation' => 'confirmation',
343342
];
344343

345344
$address = $this->getMockBuilder(\Magento\Customer\Model\Address::class)

app/code/Magento/Customer/view/base/ui_component/customer_form.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@
7474
<visible>false</visible>
7575
</settings>
7676
</field>
77+
<field name="confirmation" formElement="input">
78+
<argument name="data" xsi:type="array">
79+
<item name="config" xsi:type="array">
80+
<item name="source" xsi:type="string">customer</item>
81+
</item>
82+
</argument>
83+
<settings>
84+
<dataType>text</dataType>
85+
<visible>false</visible>
86+
</settings>
87+
</field>
7788
<field name="created_in" formElement="input">
7889
<argument name="data" xsi:type="array">
7990
<item name="config" xsi:type="array">

app/code/Magento/Paypal/Model/Payflow/Service/Request/SecureToken.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public function requestToken(Quote $quote)
6464
$request->setTrxtype(Payflowpro::TRXTYPE_AUTH_ONLY);
6565
$request->setVerbosity('HIGH');
6666
$request->setAmt(0);
67+
$request->setCurrency($quote->getBaseCurrencyCode());
6768
$request->setCreatesecuretoken('Y');
6869
$request->setSecuretokenid($this->mathRandom->getUniqueHash());
6970
$request->setReturnurl($this->url->getUrl('paypal/transparent/response'));

0 commit comments

Comments
 (0)