Skip to content

Commit 967bd3b

Browse files
author
Bohdan Korablov
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-66208-2
2 parents e936981 + 5aca8ee commit 967bd3b

File tree

254 files changed

+2069
-3576
lines changed

Some content is hidden

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

254 files changed

+2069
-3576
lines changed

app/code/Magento/Braintree/Model/Paypal/Helper/QuoteUpdater.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,5 +182,10 @@ private function updateAddressData(Address $address, array $addressData)
182182
$address->setRegionCode($addressData['region']);
183183
$address->setCountryId($addressData['countryCodeAlpha2']);
184184
$address->setPostcode($addressData['postalCode']);
185+
186+
// PayPal's address supposes not saving against customer account
187+
$address->setSaveInAddressBook(false);
188+
$address->setSameAsBilling(false);
189+
$address->setCustomerAddressId(null);
185190
}
186191
}

app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,11 @@ protected function calculateDynamicBundleAmount($basePriceValue, $bundleProduct,
316316

317317
foreach ($selectionPriceList as $selectionPrice) {
318318
++$i;
319-
$amountList[$i]['amount'] = $selectionPrice->getAmount();
320-
// always honor the quantity given
321-
$amountList[$i]['quantity'] = $selectionPrice->getQuantity();
319+
if ($selectionPrice) {
320+
$amountList[$i]['amount'] = $selectionPrice->getAmount();
321+
// always honor the quantity given
322+
$amountList[$i]['quantity'] = $selectionPrice->getQuantity();
323+
}
322324
}
323325

324326
/** @var Store $store */

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ public function getDuplicateUrl()
249249
}
250250

251251
/**
252+
* @deprecated
252253
* @return string
253254
*/
254255
public function getHeader()

app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ public function execute()
9797
$productTypeId = $this->getRequest()->getParam('type');
9898
if ($data) {
9999
try {
100-
$this->unserializeProductData($data);
101100
$product = $this->initializationHelper->initialize(
102101
$this->productBuilder->build($this->getRequest())
103102
);
@@ -181,30 +180,6 @@ public function execute()
181180
return $resultRedirect;
182181
}
183182

184-
/**
185-
* Unserialize product data for configurable products
186-
*
187-
* @param array $postData
188-
* @return void
189-
*/
190-
private function unserializeProductData($postData)
191-
{
192-
if (isset($postData["configurable-matrix-serialized"])) {
193-
$configurableMatrixSerialized = $postData["configurable-matrix-serialized"];
194-
if ($configurableMatrixSerialized != null && !empty($configurableMatrixSerialized)) {
195-
$postData["configurable-matrix"] = json_decode($configurableMatrixSerialized, true);
196-
unset($postData["configurable-matrix-serialized"]);
197-
}
198-
}
199-
if (isset($postData["associated_product_ids_serialized"])) {
200-
$associatedProductIdsSerialized = $postData["associated_product_ids_serialized"];
201-
if ($associatedProductIdsSerialized != null && !empty($associatedProductIdsSerialized)) {
202-
$postData["associated_product_ids"] = json_decode($associatedProductIdsSerialized, true);
203-
unset($postData["associated_product_ids_serialized"]);
204-
}
205-
}
206-
}
207-
208183
/**
209184
* Notify customer when image was not deleted in specific case.
210185
* TODO: temporary workaround must be eliminated in MAGETWO-45306

app/code/Magento/Catalog/Model/ResourceModel/Category.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,10 @@ public function getIsActiveAttributeId()
583583
*/
584584
public function findWhereAttributeIs($entityIdsFilter, $attribute, $expectedValue)
585585
{
586+
// @codingStandardsIgnoreStart
586587
$serializeData = $this->serializer->serialize($entityIdsFilter);
587588
$entityIdsFilterHash = md5($serializeData);
589+
// @codingStandardsIgnoreEnd
588590

589591
if (!isset($this->entitiesWhereAttributesIs[$entityIdsFilterHash][$attribute->getId()][$expectedValue])) {
590592
$linkField = $this->getLinkField();
@@ -767,7 +769,6 @@ public function getChildren($category, $recursive = true)
767769
$backendTable = $this->getTable([$this->getEntityTablePrefix(), 'int']);
768770
$connection = $this->getConnection();
769771
$checkSql = $connection->getCheckSql('c.value_id > 0', 'c.value', 'd.value');
770-
$linkField = $this->getLinkField();
771772
$bind = [
772773
'attribute_id' => $attributeId,
773774
'store_id' => $category->getStoreId(),

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,7 @@ define([
383383
* Chose action for the form save button
384384
*/
385385
saveFormHandler: function () {
386-
this.source.data['configurable-matrix-serialized'] =
387-
JSON.stringify(this.source.data['configurable-matrix']);
388-
delete this.source.data['configurable-matrix'];
389-
this.source.data['associated_product_ids_serialized'] =
390-
JSON.stringify(this.source.data['associated_product_ids']);
391-
delete this.source.data['associated_product_ids'];
386+
this.serializeData();
392387

393388
if (this.checkForNewAttributes()) {
394389
this.formSaveParams = arguments;
@@ -398,6 +393,31 @@ define([
398393
}
399394
},
400395

396+
/**
397+
* Serialize data for specific form fields
398+
*
399+
* Get data from outdated fields, serialize it and produce new form fields.
400+
*
401+
* Outdated fields:
402+
* - configurable-matrix;
403+
* - associated_product_ids.
404+
*
405+
* New fields:
406+
* - configurable-matrix-serialized;
407+
* - associated_product_ids_serialized.
408+
*/
409+
serializeData: function () {
410+
this.source.data['configurable-matrix-serialized'] =
411+
JSON.stringify(this.source.data['configurable-matrix']);
412+
413+
delete this.source.data['configurable-matrix'];
414+
415+
this.source.data['associated_product_ids_serialized'] =
416+
JSON.stringify(this.source.data['associated_product_ids']);
417+
418+
delete this.source.data['associated_product_ids'];
419+
},
420+
401421
/**
402422
* Check for newly added attributes
403423
* @returns {Boolean}

app/code/Magento/Customer/Block/Account/Dashboard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ public function getManageNewsletterUrl()
170170
public function getSubscriptionText()
171171
{
172172
if ($this->getSubscriptionObject()->isSubscribed()) {
173-
return __('You subscribe to our newsletter.');
173+
return __('You are subscribed to our newsletter.');
174174
}
175175

176-
return __('You don\'t subscribe to our newsletter.');
176+
return __('You aren\'t subscribed to our newsletter.');
177177
}
178178

179179
/**

app/code/Magento/Customer/i18n/en_US.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"Sign Out","Sign Out"
22
"Sign In","Sign In"
3-
"You subscribe to our newsletter.","You subscribe to our newsletter."
4-
"You don\'t subscribe to our newsletter.","You don\'t subscribe to our newsletter."
3+
"You are subscribed to our newsletter.","You are subscribed to our newsletter."
4+
"You aren't subscribed to our newsletter.","You aren't subscribed to our newsletter."
55
"You have not set a default shipping address.","You have not set a default shipping address."
66
"You have not set a default billing address.","You have not set a default billing address."
77
"Address Book","Address Book"
@@ -308,7 +308,7 @@ Change,Change
308308
"Contact Information","Contact Information"
309309
"Change Password","Change Password"
310310
Newsletters,Newsletters
311-
"You subscribe to ""General Subscription"".","You subscribe to ""General Subscription""."
311+
"You are subscribed to ""General Subscription"".","You are subscribed to ""General Subscription""."
312312
or,or
313313
"Default Addresses","Default Addresses"
314314
"Change Billing Address","Change Billing Address"

app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
<div class="box-content">
3939
<p>
4040
<?php if ($block->getIsSubscribed()): ?>
41-
<?php echo $block->escapeHtml(__('You subscribe to "General Subscription".')) ?>
41+
<?php echo $block->escapeHtml(__('You are subscribed to "General Subscription".')) ?>
4242
<?php else: ?>
43-
<?php echo $block->escapeHtml(__('You don\'t subscribe to our newsletter.')) ?>
43+
<?php echo $block->escapeHtml(__('You aren\'t subscribed to our newsletter.')) ?>
4444
<?php endif; ?>
4545
</p>
4646
<?php /* Extensions placeholder */ ?>

app/code/Magento/Deploy/Collector/Collector.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
use Magento\Framework\View\Asset\PreProcessor\FileNameResolver;
1212

1313
/**
14-
* Class Collector
14+
* Deployable files collector
1515
*
16-
* Default implementation uses Source Pool object which provides collection of static files sources
17-
*
18-
* @see SourcePool
16+
* Default implementation uses Source Pool object (@see SourcePool)
1917
*/
2018
class Collector implements CollectorInterface
2119
{

0 commit comments

Comments
 (0)