-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from magento-commerce/1.1.58-release
1.1.58 Release
- Loading branch information
Showing
21 changed files
with
2,278 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
diff --git a/vendor/magento/module-purchase-order/Plugin/Quote/Model/QuotePlugin.php b/vendor/magento/module-purchase-order/Plugin/Quote/Model/QuotePlugin.php | ||
index 2e230c870bef..420176d1d9fa 100644 | ||
--- a/vendor/magento/module-purchase-order/Plugin/Quote/Model/QuotePlugin.php | ||
+++ b/vendor/magento/module-purchase-order/Plugin/Quote/Model/QuotePlugin.php | ||
@@ -1,7 +1,21 @@ | ||
<?php | ||
-/** | ||
- * Copyright © Magento, Inc. All rights reserved. | ||
- * See COPYING.txt for license details. | ||
+/************************************************************************ | ||
+ * | ||
+ * ADOBE CONFIDENTIAL | ||
+ * ___________________ | ||
+ * | ||
+ * Copyright 2020 Adobe | ||
+ * All Rights Reserved. | ||
+ * | ||
+ * NOTICE: All information contained herein is, and remains | ||
+ * the property of Adobe and its suppliers, if any. The intellectual | ||
+ * and technical concepts contained herein are proprietary to Adobe | ||
+ * and its suppliers and are protected by all applicable intellectual | ||
+ * property laws, including trade secret and copyright laws. | ||
+ * Dissemination of this information or reproduction of this material | ||
+ * is strictly forbidden unless prior written permission is obtained | ||
+ * from Adobe. | ||
+ * ************************************************************************ | ||
*/ | ||
declare(strict_types=1); | ||
|
||
@@ -32,7 +46,7 @@ public function __construct( | ||
} | ||
|
||
/** | ||
- * Skip collect totals for purchase order | ||
+ * Skip collect totals for purchase order except while converted to an order | ||
* | ||
* @param Quote $subject | ||
* @param \Closure $proceed | ||
@@ -40,10 +54,19 @@ public function __construct( | ||
*/ | ||
public function aroundCollectTotals(Quote $subject, \Closure $proceed) | ||
{ | ||
- if ($this->isPurchaseOrderQuote($subject) && !$subject->getIsVirtual()) { | ||
- return $subject; | ||
+ if (!$this->isPurchaseOrderQuote($subject) || $subject->getIsVirtual()) { | ||
+ return $proceed(); | ||
+ } | ||
+ | ||
+ if ($subject->getIsActive() && $subject->getTotalsCollectedFlag()) { | ||
+ $items = $subject->getItems(); | ||
+ if (is_array($items) && (float)$items[0]->getData('tax_amount') > 0) { | ||
+ $subject->setTotalsCollectedFlag(false); | ||
+ return $proceed(); | ||
+ } | ||
} | ||
- return $proceed(); | ||
+ | ||
+ return $subject; | ||
} | ||
|
||
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
diff --git a/vendor/magento/module-gift-registry/Block/Email/Items.php b/vendor/magento/module-gift-registry/Block/Email/Items.php | ||
index 3cbacb020bc2..c988eb5ea708 100644 | ||
--- a/vendor/magento/module-gift-registry/Block/Email/Items.php | ||
+++ b/vendor/magento/module-gift-registry/Block/Email/Items.php | ||
@@ -1,8 +1,23 @@ | ||
<?php | ||
-/** | ||
- * Copyright © Magento, Inc. All rights reserved. | ||
- * See COPYING.txt for license details. | ||
+/************************************************************************ | ||
+ * | ||
+ * ADOBE CONFIDENTIAL | ||
+ * ___________________ | ||
+ * | ||
+ * Copyright 2014 Adobe | ||
+ * All Rights Reserved. | ||
+ * | ||
+ * NOTICE: All information contained herein is, and remains | ||
+ * the property of Adobe and its suppliers, if any. The intellectual | ||
+ * and technical concepts contained herein are proprietary to Adobe | ||
+ * and its suppliers and are protected by all applicable intellectual | ||
+ * property laws, including trade secret and copyright laws. | ||
+ * Dissemination of this information or reproduction of this material | ||
+ * is strictly forbidden unless prior written permission is obtained | ||
+ * from Adobe. | ||
+ * ************************************************************************ | ||
*/ | ||
+ | ||
namespace Magento\GiftRegistry\Block\Email; | ||
|
||
use Magento\GiftRegistry\Model\ResourceModel\Item\CollectionFactory as CollectionFactory; | ||
@@ -47,7 +62,15 @@ public function getItems() | ||
if ($entity) { | ||
return $entity->getItemsCollection(); | ||
} | ||
- return $this->entityCollectionFactory->create(); | ||
+ | ||
+ $collection = $this->entityCollectionFactory->create(); | ||
+ if ($this->getEntityId()) { | ||
+ $collection->addRegistryFilter($this->getEntityId()); | ||
+ } else { | ||
+ // If entity id is not set, return empty collection | ||
+ $collection->getSelect()->where('1=0'); | ||
+ } | ||
+ return $collection; | ||
} | ||
|
||
/** | ||
@@ -58,7 +81,7 @@ public function getItems() | ||
*/ | ||
public function getQtyOrdered($item) | ||
{ | ||
- $updatedQty = $this->getEntity()->getUpdatedQty(); | ||
+ $updatedQty = $this->getUpdatedQty() ?? $this->getEntity()?->getUpdatedQty(); | ||
if (is_array($updatedQty) && !empty($updatedQty[$item->getId()]['ordered'])) { | ||
return $updatedQty[$item->getId()]['ordered'] * 1; | ||
} | ||
@@ -100,7 +123,7 @@ public function getQty($item) | ||
*/ | ||
public function getQtyFulfilled($item) | ||
{ | ||
- $updatedQty = $this->getEntity()->getUpdatedQty(); | ||
+ $updatedQty = $this->getUpdatedQty() ?? $this->getEntity()?->getUpdatedQty(); | ||
if (is_array($updatedQty) && !empty($updatedQty[$item->getId()]['fulfilled'])) { | ||
return $updatedQty[$item->getId()]['fulfilled'] * 1; | ||
} | ||
diff --git a/vendor/magento/module-gift-registry/view/frontend/email/update.html b/vendor/magento/module-gift-registry/view/frontend/email/update.html | ||
index db41f2979f60..8da914b58baf 100644 | ||
--- a/vendor/magento/module-gift-registry/view/frontend/email/update.html | ||
+++ b/vendor/magento/module-gift-registry/view/frontend/email/update.html | ||
@@ -1,7 +1,21 @@ | ||
<!-- | ||
-/** | ||
- * Copyright © Magento, Inc. All rights reserved. | ||
- * See COPYING.txt for license details. | ||
+/************************************************************************ | ||
+ * | ||
+ * ADOBE CONFIDENTIAL | ||
+ * ___________________ | ||
+ * | ||
+ * Copyright 2014 Adobe | ||
+ * All Rights Reserved. | ||
+ * | ||
+ * NOTICE: All information contained herein is, and remains | ||
+ * the property of Adobe and its suppliers, if any. The intellectual | ||
+ * and technical concepts contained herein are proprietary to Adobe | ||
+ * and its suppliers and are protected by all applicable intellectual | ||
+ * property laws, including trade secret and copyright laws. | ||
+ * Dissemination of this information or reproduction of this material | ||
+ * is strictly forbidden unless prior written permission is obtained | ||
+ * from Adobe. | ||
+ * ************************************************************************ | ||
*/ | ||
--> | ||
<!--@subject {{trans "Gift Registry updated at %store_name" store_name=$store.frontend_name}} @--> | ||
@@ -15,6 +29,8 @@ | ||
"layout handle=\"magento_giftregistry_email_entity_items\" entity=$entity":"Registry Items", | ||
"var entity.title|escape":"Registry Title", | ||
"var store.frontend_name":"Store Name", | ||
+"var entity.entity_id":"Gift Registry ID", | ||
+"var entity.updated_qty":"List of Gift Registry items with updated quantities", | ||
"store url=\"\"":"Store URL", | ||
"var entity":"Entity" | ||
} @--> | ||
@@ -25,7 +41,7 @@ | ||
|
||
<p>{{trans "The following items have been purchased from your gift registry \"%registry_name\":" registry_name=$entity.title}}</p> | ||
|
||
-{{layout handle="magento_giftregistry_email_entity_items" entity=$entity}} | ||
+{{layout handle="magento_giftregistry_email_entity_items" entity_id=$entity.entity_id updated_qty=$entity.updated_qty}} | ||
|
||
<p>{{trans "You can sign in to your account to view more details about this gift registry."}}</p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
diff --git a/vendor/magento/module-advanced-checkout/Block/Adminhtml/Sku/AbstractSku.php b/vendor/magento/module-advanced-checkout/Block/Adminhtml/Sku/AbstractSku.php | ||
index 06f702316482..6fe209f6fac8 100644 | ||
--- a/vendor/magento/module-advanced-checkout/Block/Adminhtml/Sku/AbstractSku.php | ||
+++ b/vendor/magento/module-advanced-checkout/Block/Adminhtml/Sku/AbstractSku.php | ||
@@ -1,11 +1,24 @@ | ||
<?php | ||
-/** | ||
- * Copyright © Magento, Inc. All rights reserved. | ||
- * See COPYING.txt for license details. | ||
+/************************************************************************ | ||
+ * | ||
+ * ADOBE CONFIDENTIAL | ||
+ * ___________________ | ||
+ * | ||
+ * Copyright 2014 Adobe | ||
+ * All Rights Reserved. | ||
+ * | ||
+ * NOTICE: All information contained herein is, and remains | ||
+ * the property of Adobe and its suppliers, if any. The intellectual | ||
+ * and technical concepts contained herein are proprietary to Adobe | ||
+ * and its suppliers and are protected by all applicable intellectual | ||
+ * property laws, including trade secret and copyright laws. | ||
+ * Dissemination of this information or reproduction of this material | ||
+ * is strictly forbidden unless prior written permission is obtained | ||
+ * from Adobe. | ||
+ * ************************************************************************ | ||
*/ | ||
+ | ||
namespace Magento\AdvancedCheckout\Block\Adminhtml\Sku; | ||
-use Magento\Framework\App\ObjectManager; | ||
-use Magento\Framework\View\Helper\SecureHtmlRenderer; | ||
|
||
/** | ||
* Admin Checkout main form container | ||
@@ -22,7 +35,7 @@ abstract class AbstractSku extends \Magento\Backend\Block\Template | ||
/** | ||
* List type of current block | ||
*/ | ||
- const LIST_TYPE = 'add_by_sku'; | ||
+ public const LIST_TYPE = 'add_by_sku'; | ||
|
||
/** | ||
* @var string | ||
@@ -34,27 +47,19 @@ abstract class AbstractSku extends \Magento\Backend\Block\Template | ||
*/ | ||
protected $_jsonEncoder; | ||
|
||
- /** | ||
- * @var SecureHtmlRenderer | ||
- */ | ||
- private $secureRenderer; | ||
- | ||
/** | ||
* @codeCoverageIgnore | ||
* @param \Magento\Backend\Block\Template\Context $context | ||
* @param \Magento\Framework\Json\EncoderInterface $jsonEncoder | ||
* @param array $data | ||
- * @param SecureHtmlRenderer|null $secureRenderer | ||
* @codeCoverageIgnore | ||
*/ | ||
public function __construct( | ||
\Magento\Backend\Block\Template\Context $context, | ||
\Magento\Framework\Json\EncoderInterface $jsonEncoder, | ||
- array $data = [], | ||
- SecureHtmlRenderer $secureRenderer = null | ||
+ array $data = [] | ||
) { | ||
$this->_jsonEncoder = $jsonEncoder; | ||
- $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class); | ||
parent::__construct($context, $data); | ||
} | ||
|
||
@@ -79,33 +84,10 @@ protected function _construct() | ||
*/ | ||
protected function _prepareLayout() | ||
{ | ||
- //Delete button will be copied for each row so we need a listener that will work for duplicates. | ||
- $deleteButtonId = $this->mathRandom->getRandomString('8'); | ||
- $deleteButtonClass = 'admin-checkout-sku-delete-button-' . $deleteButtonId; | ||
- $deleteFunctionName = 'skuDeleteButtonListener' . $deleteButtonId; | ||
- $deleteActionScript = <<<SCRIPT | ||
- if (typeof($deleteFunctionName) == "undefined") { | ||
- $deleteFunctionName = function (event) { | ||
- addBySku.del(event.target); | ||
- }; | ||
- require(['jquery'], function($){ | ||
- $("body").on("click", ".$deleteButtonClass", $deleteFunctionName); | ||
- }); | ||
- } | ||
-SCRIPT; | ||
$this->addChild( | ||
'deleteButton', | ||
\Magento\Backend\Block\Widget\Button::class, | ||
- [ | ||
- 'label' => '', | ||
- 'class' => 'action-delete ' . $deleteButtonClass, | ||
- 'before_html' => $this->secureRenderer->renderTag( | ||
- 'script', | ||
- ['type' => 'text/javascript'], | ||
- $deleteActionScript, | ||
- false | ||
- ), | ||
- ] | ||
+ ['label' => '', 'class' => 'action-delete'] | ||
); | ||
|
||
$this->addChild( | ||
diff --git a/vendor/magento/module-advanced-checkout/view/adminhtml/templates/sku/add.phtml b/vendor/magento/module-advanced-checkout/view/adminhtml/templates/sku/add.phtml | ||
index c84b601f5df9..b85a7f5254b6 100644 | ||
--- a/vendor/magento/module-advanced-checkout/view/adminhtml/templates/sku/add.phtml | ||
+++ b/vendor/magento/module-advanced-checkout/view/adminhtml/templates/sku/add.phtml | ||
@@ -1,12 +1,28 @@ | ||
<?php | ||
-/** | ||
- * Copyright © Magento, Inc. All rights reserved. | ||
- * See COPYING.txt for license details. | ||
+/************************************************************************ | ||
+ * | ||
+ * ADOBE CONFIDENTIAL | ||
+ * ___________________ | ||
+ * | ||
+ * Copyright 2014 Adobe | ||
+ * All Rights Reserved. | ||
+ * | ||
+ * NOTICE: All information contained herein is, and remains | ||
+ * the property of Adobe and its suppliers, if any. The intellectual | ||
+ * and technical concepts contained herein are proprietary to Adobe | ||
+ * and its suppliers and are protected by all applicable intellectual | ||
+ * property laws, including trade secret and copyright laws. | ||
+ * Dissemination of this information or reproduction of this material | ||
+ * is strictly forbidden unless prior written permission is obtained | ||
+ * from Adobe. | ||
+ * ************************************************************************ | ||
*/ | ||
// phpcs:disable Generic.Files.LineLength | ||
|
||
/** | ||
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer | ||
+ * @var \Magento\Framework\Escaper $escaper | ||
+ * @var \Magento\AdvancedCheckout\Block\Adminhtml\Sku\AbstractSku $block | ||
*/ | ||
?> | ||
<div class="add-by-sku-wrapper"> | ||
@@ -18,8 +34,8 @@ | ||
class="admin__control-table"> | ||
<thead> | ||
<tr class="headings"> | ||
- <th class="col-sku"><?= $block->escapeHtml(__('SKU number')) ?></th> | ||
- <th class="col-qty"><?= $block->escapeHtml(__('Qty')) ?></th> | ||
+ <th class="col-sku"><?= $escaper->escapeHtml(__('SKU number')) ?></th> | ||
+ <th class="col-qty"><?= $escaper->escapeHtml(__('Qty')) ?></th> | ||
<th class="col-actions last"> </th> | ||
</tr> | ||
</thead> | ||
@@ -51,10 +67,10 @@ | ||
</div> | ||
</div> | ||
<div class="admin__field add-sku-csv"> | ||
- <label class="admin__field-label" for="sku_upload"><?= $block->escapeHtml(__('Upload File')) ?></label> | ||
+ <label class="admin__field-label" for="sku_upload"><?= $escaper->escapeHtml(__('Upload File')) ?></label> | ||
<div class="admin__field-control"> | ||
<div class="admin__field-note"> | ||
- <span><?= $block->escapeHtml(__('Your csv file must include "sku" and "qty" columns.')) ?></span> | ||
+ <span><?= $escaper->escapeHtml(__('Your csv file must include "sku" and "qty" columns.')) ?></span> | ||
</div> | ||
<?php $inputName = \Magento\AdvancedCheckout\Model\Import::FIELD_NAME_SOURCE_FILE; ?> | ||
<input | ||
@@ -65,7 +81,7 @@ | ||
value="" /> | ||
<button type="button" | ||
class="action-default action-reset"> | ||
- <span><?= $block->escapeHtml(__('Reset')) ?></span> | ||
+ <span><?= $escaper->escapeHtml(__('Reset')) ?></span> | ||
</button> | ||
</div> | ||
<?= /* @noEscape */ | ||
@@ -79,7 +95,7 @@ | ||
</div> | ||
|
||
<?php | ||
-$adminCheckoutInstanceName = $block->escapeJs($block->getJsOrderObject()); | ||
+$adminCheckoutInstanceName = $escaper->escapeJs($block->getJsOrderObject()); | ||
$addBySkuData = $block->getAddBySkuDataJson(); | ||
$additionalJavaScript = $block->getAdditionalJavascript(); | ||
$contextSpecificJs = $block->getContextSpecificJs(); | ||
@@ -115,7 +131,7 @@ require([ | ||
} | ||
|
||
window.initSku = initSku; | ||
- $('sku_table').on('click', "[data-ui-id='sku-accordion-deletebutton']", function(event) { | ||
+ jQuery('#sku_table').on('click', '.action-delete', function(event) { | ||
addBySku.del(event.target); | ||
}); | ||
|
||
|
Oops, something went wrong.