Skip to content

Commit bbaa5fb

Browse files
author
Joan He
committed
Merge remote-tracking branch 'upstream/2.3-develop' into MAGETWO-90927-product-save-warning
2 parents 41c0260 + e08b953 commit bbaa5fb

File tree

208 files changed

+3001
-532
lines changed

Some content is hidden

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

208 files changed

+3001
-532
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ Tests:
19771977
* [#686](https://github.com/magento/magento2/issues/686) -- Product save validation errors in the admin don't hide the overlay
19781978
* [#702](https://github.com/magento/magento2/issues/702) -- Base table or view not found
19791979
* [#652](https://github.com/magento/magento2/issues/652) -- Multishipping checkout not to change the Billing address js issue
1980-
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to to break the tabs functionality
1980+
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to break the tabs functionality
19811981
* Service Contracts:
19821982
* Refactored usage of new API of the Customer module
19831983
* Implemented Service Contracts for the Sales module

app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<?= /* @escapeNotVerified */ $edition ?>
1818
class="logo">
1919
<img class="logo-img" src="<?= /* @escapeNotVerified */ $block->getViewFileUrl($logoSrc) ?>"
20-
alt="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>"/>
20+
alt="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>" title="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>"/>
2121
</a>
2222
<?php break; ?>
2323
<?php case 'user': ?>

app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<?php foreach ($block->getValues()->getAttributeBackend()->getImageTypes() as $type): ?>
3535
<td class="gallery" align="center" style="vertical-align:bottom;">
3636
<a href="<?= /* @escapeNotVerified */ $image->setType($type)->getSourceUrl() ?>" target="_blank" onclick="imagePreview('<?= $block->getElement()->getHtmlId() ?>_image_<?= /* @escapeNotVerified */ $type ?>_<?= /* @escapeNotVerified */ $image->getValueId() ?>');return false;">
37-
<img id="<?= $block->getElement()->getHtmlId() ?>_image_<?= /* @escapeNotVerified */ $type ?>_<?= /* @escapeNotVerified */ $image->getValueId() ?>" src="<?= /* @escapeNotVerified */ $image->setType($type)->getSourceUrl() ?>?<?= /* @escapeNotVerified */ time() ?>" alt="<?= /* @escapeNotVerified */ $image->getValue() ?>" height="25" class="small-image-preview v-middle"/></a><br/>
37+
<img id="<?= $block->getElement()->getHtmlId() ?>_image_<?= /* @escapeNotVerified */ $type ?>_<?= /* @escapeNotVerified */ $image->getValueId() ?>" src="<?= /* @escapeNotVerified */ $image->setType($type)->getSourceUrl() ?>?<?= /* @escapeNotVerified */ time() ?>" alt="<?= /* @escapeNotVerified */ $image->getValue() ?>" title="<?= /* @escapeNotVerified */ $image->getValue() ?>" height="25" class="small-image-preview v-middle"/></a><br/>
3838
<input type="file" name="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>_<?= /* @escapeNotVerified */ $type ?>[<?= /* @escapeNotVerified */ $image->getValueId() ?>]" size="1"></td>
3939
<?php endforeach; ?>
4040
<td class="gallery" align="center" style="vertical-align:bottom;"><input type="input" name="<?= /* @escapeNotVerified */ $block->getElement()->getParentName() ?>[position][<?= /* @escapeNotVerified */ $image->getValueId() ?>]" value="<?= /* @escapeNotVerified */ $image->getPosition() ?>" id="<?= $block->getElement()->getHtmlId() ?>_position_<?= /* @escapeNotVerified */ $image->getValueId() ?>" size="3"/></td>

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/paypal.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
define([
88
'jquery',
99
'underscore',
10+
'mage/utils/wrapper',
1011
'Magento_Checkout/js/view/payment/default',
1112
'Magento_Braintree/js/view/payment/adapter',
1213
'Magento_Checkout/js/model/quote',
@@ -18,6 +19,7 @@ define([
1819
], function (
1920
$,
2021
_,
22+
wrapper,
2123
Component,
2224
Braintree,
2325
quote,
@@ -218,8 +220,9 @@ define([
218220

219221
/**
220222
* Re-init PayPal Auth Flow
223+
* @param {Function} callback - Optional callback
221224
*/
222-
reInitPayPal: function () {
225+
reInitPayPal: function (callback) {
223226
if (Braintree.checkout) {
224227
Braintree.checkout.teardown(function () {
225228
Braintree.checkout = null;
@@ -228,6 +231,18 @@ define([
228231

229232
this.disableButton();
230233
this.clientConfig.paypal.amount = this.grandTotalAmount;
234+
this.clientConfig.paypal.shippingAddressOverride = this.getShippingAddress();
235+
236+
if (callback) {
237+
this.clientConfig.onReady = wrapper.wrap(
238+
this.clientConfig.onReady,
239+
function (original, checkout) {
240+
this.clientConfig.onReady = original;
241+
original(checkout);
242+
callback();
243+
}.bind(this)
244+
);
245+
}
231246

232247
Braintree.setConfig(this.clientConfig);
233248
Braintree.setup();
@@ -403,15 +418,19 @@ define([
403418
* Triggers when customer click "Continue to PayPal" button
404419
*/
405420
payWithPayPal: function () {
406-
if (additionalValidators.validate()) {
421+
this.reInitPayPal(function () {
422+
if (!additionalValidators.validate()) {
423+
return;
424+
}
425+
407426
try {
408427
Braintree.checkout.paypal.initAuthFlow();
409428
} catch (e) {
410429
this.messageContainer.addErrorMessage({
411430
message: $t('Payment ' + this.getTitle() + ' can\'t be initialized.')
412431
});
413432
}
414-
}
433+
}.bind(this));
415434
},
416435

417436
/**

app/code/Magento/Braintree/view/frontend/web/template/payment/paypal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()" />
1313
<label class="label" data-bind="attr: {'for': getCode()}">
1414
<!-- PayPal Logo -->
15-
<img data-bind="attr: {src: getPaymentAcceptanceMarkSrc(), alt: $t('Acceptance Mark')}, title: $t('Acceptance Mark')}"
15+
<img data-bind="attr: {src: getPaymentAcceptanceMarkSrc(), alt: $t('Acceptance Mark'), title: $t('Acceptance Mark')}"
1616
class="payment-icon"/>
1717
<!-- PayPal Logo -->
1818
<span text="getTitle()"></span>

app/code/Magento/Bundle/Test/Mftf/Data/BundleLinkData.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="ApiBundleLink" type="bundle_link">
1212
<var key="sku" entityKey="sku" entityType="product2"/>
13-
<var key="option_id" entityKey="option_id" entityType="bundle_options"/>
13+
<var key="option_id" entityKey="return" entityType="bundle_option"/>
1414
<var key="sku" entityKey="sku" entityType="product"/>
1515
<data key="qty">1</data>
16-
<data key="is_default">1</data>
16+
<data key="is_default">0</data>
1717
<data key="price">1.11</data>
1818
<data key="price_type">1</data>
1919
<data key="can_change_quantity">1</data>

app/code/Magento/Bundle/Test/Mftf/Data/BundleOptionData.xml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,34 @@
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11-
<entity name="DropdownBundleOption" type="bundle_option">
11+
<entity name="DropDownBundleOption" type="bundle_option">
1212
<data key="title" unique="suffix">bundle-option-dropdown</data>
1313
<data key="required">true</data>
14-
<data key="type">dropdown</data>
14+
<data key="type">select</data>
15+
<data key="position">0</data>
16+
<var key="sku" entityKey="sku" entityType="product2"/>
17+
</entity>
18+
<entity name="RadioButtonsOption" type="bundle_option">
19+
<data key="title" unique="suffix">bundle-option-radio</data>
20+
<data key="required">true</data>
21+
<data key="type">radio</data>
1522
<data key="position">1</data>
1623
<var key="sku" entityKey="sku" entityType="product2"/>
1724
</entity>
25+
<entity name="CheckboxOption" type="bundle_option">
26+
<data key="title" unique="suffix">bundle-option-checkbox</data>
27+
<data key="required">true</data>
28+
<data key="type">checkbox</data>
29+
<data key="position">3</data>
30+
<var key="sku" entityKey="sku" entityType="product2"/>
31+
</entity>
32+
<entity name="MultipleSelectOption" type="bundle_option">
33+
<data key="title" unique="suffix">bundle-option-multipleselect</data>
34+
<data key="required">true</data>
35+
<data key="type">multi</data>
36+
<data key="position">4</data>
37+
<var key="sku" entityKey="sku" entityType="product2"/>
38+
</entity>
1839
<entity name="AllBundleOptions" type="bundle_options">
1940
<var key="sku" entityKey="sku" entityType="product"/>
2041
</entity>

app/code/Magento/Bundle/Test/Mftf/Data/CustomAttributeData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@
1919
<data key="attribute_code">price_view</data>
2020
<data key="value">1</data>
2121
</entity>
22+
<entity name="CustomAttributePriceViewRange" type="custom_attribute">
23+
<data key="attribute_code">price_view</data>
24+
<data key="value">0</data>
25+
</entity>
2226
</entities>

app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,19 @@
4545
<requiredEntity type="custom_attribute">CustomAttributeDynamicPrice</requiredEntity>
4646
<requiredEntity type="custom_attribute">CustomAttributePriceView</requiredEntity>
4747
</entity>
48+
<entity name="ApiBundleProductPriceViewRange" type="product2">
49+
<data key="name" unique="suffix">Api Bundle Product</data>
50+
<data key="sku" unique="suffix">api-bundle-product</data>
51+
<data key="type_id">bundle</data>
52+
<data key="attribute_set_id">4</data>
53+
<data key="visibility">4</data>
54+
<data key="status">1</data>
55+
<data key="urlKey" unique="suffix">api-bundle-product</data>
56+
<requiredEntity type="custom_attribute">CustomAttributeCategoryIds</requiredEntity>
57+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
58+
<requiredEntity type="custom_attribute">ApiProductDescription</requiredEntity>
59+
<requiredEntity type="custom_attribute">ApiProductShortDescription</requiredEntity>
60+
<requiredEntity type="custom_attribute">CustomAttributeDynamicPrice</requiredEntity>
61+
<requiredEntity type="custom_attribute">CustomAttributePriceViewRange</requiredEntity>
62+
</entity>
4863
</entities>

app/code/Magento/Bundle/Test/Mftf/Metadata/bundle_link-meta.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
11-
<operation name="CreateBundleLink" dataType="bundle_link" type="create" auth="adminOauth" url="/V1/bundle-products/{sku}/links/{option_id}" method="POST">
11+
<operation name="CreateBundleLink" dataType="bundle_link" type="create" auth="adminOauth" url="/V1/bundle-products/{sku}/links/{return}" method="POST">
1212
<contentType>application/json</contentType>
1313
<object dataType="bundle_link" key="linkedProduct">
1414
<field key="sku">string</field>

0 commit comments

Comments
 (0)