From 335bca412c2f699ddfd64ad235b2001f00ef640c Mon Sep 17 00:00:00 2001 From: Ronak Patel <11473750+ronak2ram@users.noreply.github.com> Date: Sun, 8 Jul 2018 14:28:54 +0530 Subject: [PATCH 01/51] Update CustomerFlushFormKey.php --- app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php b/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php index c583af84cce50..213d4ab3527e6 100644 --- a/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php +++ b/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php @@ -47,7 +47,7 @@ public function aroundExecute(FlushFormKey $subject, callable $proceed, Observer $currentFormKey = $this->dataFormKey->getFormKey(); $proceed($observer); $beforeParams = $this->session->getBeforeRequestParams(); - if ($beforeParams['form_key'] == $currentFormKey) { + if (isset($beforeParams['form_key']) && $beforeParams['form_key'] === $currentFormKey) { $beforeParams['form_key'] = $this->dataFormKey->getFormKey(); $this->session->setBeforeRequestParams($beforeParams); } From f9ccb51551943b2e841c64aef1f7eb6e12be2521 Mon Sep 17 00:00:00 2001 From: Sean Templeton Date: Mon, 9 Jul 2018 22:55:49 -0500 Subject: [PATCH 02/51] Prevent running SQL query on every item in the database when the quote is empty --- .../Quote/Model/ResourceModel/Quote/Item/Collection.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php b/app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php index 161ff159a2df9..12bb78b0c75ad 100644 --- a/app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php +++ b/app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php @@ -272,6 +272,10 @@ protected function _assignProducts() */ private function removeItemsWithAbsentProducts() { + if (count($this->_productIds) === 0) { + return; + } + $productCollection = $this->_productCollectionFactory->create()->addIdFilter($this->_productIds); $existingProductsIds = $productCollection->getAllIds(); $absentProductsIds = array_diff($this->_productIds, $existingProductsIds); From 3d27dfff842d2954829a4c10f2d23c86c487a191 Mon Sep 17 00:00:00 2001 From: Bartek Igielski Date: Tue, 27 Mar 2018 16:20:57 +0200 Subject: [PATCH 03/51] Fixed extends and removed unnecessary variables --- .../web/css/source/module/checkout/_tooltip.less | 3 +-- .../Magento/blank/Magento_Sales/web/css/source/_module.less | 2 +- .../blank/web/css/source/components/_modals_extend.less | 5 ++--- .../luma/web/css/source/components/_modals_extend.less | 5 ++--- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_tooltip.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_tooltip.less index cf84f34279086..273f626ec03d6 100644 --- a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_tooltip.less +++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_tooltip.less @@ -8,7 +8,6 @@ // _____________________________________________ @checkout-tooltip__hover__z-index: @tooltip__z-index; -@checkout-tooltip-breakpoint__screen-m: @modal-popup-breakpoint-screen__m; @checkout-tooltip-icon-arrow__font-size: 10px; @checkout-tooltip-icon-arrow__left: -( @checkout-tooltip-content__padding + @checkout-tooltip-icon-arrow__font-size - @checkout-tooltip-content__border-width); @@ -138,7 +137,7 @@ } } -.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @checkout-tooltip-breakpoint__screen-m) { +.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) { .field-tooltip { .field-tooltip-content { &:extend(.abs-checkout-tooltip-content-position-top-mobile all); diff --git a/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/_module.less b/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/_module.less index 37f59cf59d1f8..8263432359238 100644 --- a/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/_module.less +++ b/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/_module.less @@ -262,7 +262,7 @@ } .toolbar { - &:extend(.abs-add-clearfix-desktop all); + &:extend(.abs-add-clearfix-mobile all); .pages { float: right; diff --git a/app/design/frontend/Magento/blank/web/css/source/components/_modals_extend.less b/app/design/frontend/Magento/blank/web/css/source/components/_modals_extend.less index d324bbeac598f..d76630b5cea47 100644 --- a/app/design/frontend/Magento/blank/web/css/source/components/_modals_extend.less +++ b/app/design/frontend/Magento/blank/web/css/source/components/_modals_extend.less @@ -16,7 +16,6 @@ @modal-popup-title__font-size: 26px; @modal-popup-title-mobile__font-size: @font-size__base; -@modal-popup-breakpoint-screen__m: @screen__m; @modal-slide__first__indent-left: 44px; @modal-slide-mobile__background-color: @color-gray-light01; @@ -149,7 +148,7 @@ } } -.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @modal-popup-breakpoint-screen__m) { +.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) { .modal-popup { &.modal-slide { .modal-inner-wrap[class] { @@ -180,7 +179,7 @@ // Desktop // _____________________________________________ -.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @modal-popup-breakpoint-screen__m) { +.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) { .modal-popup { &.modal-slide { .modal-footer { diff --git a/app/design/frontend/Magento/luma/web/css/source/components/_modals_extend.less b/app/design/frontend/Magento/luma/web/css/source/components/_modals_extend.less index b3165a41964e5..e90d312aa7801 100644 --- a/app/design/frontend/Magento/luma/web/css/source/components/_modals_extend.less +++ b/app/design/frontend/Magento/luma/web/css/source/components/_modals_extend.less @@ -16,7 +16,6 @@ @modal-popup-title__font-size: 26px; @modal-popup-title-mobile__font-size: @font-size__base; -@modal-popup-breakpoint-screen__m: @screen__m; @modal-slide__first__indent-left: 44px; @modal-slide-mobile__background-color: @color-gray-light01; @@ -148,7 +147,7 @@ } } -.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @modal-popup-breakpoint-screen__m) { +.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) { .modal-popup { &.modal-slide { .modal-inner-wrap[class] { @@ -179,7 +178,7 @@ // Desktop // _____________________________________________ -.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @modal-popup-breakpoint-screen__m) { +.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) { .modal-popup { &.modal-slide { .modal-footer { From 727503d8c256fc8c7e842b39a23edbb785de37a3 Mon Sep 17 00:00:00 2001 From: Robert Paprocki Date: Mon, 5 Feb 2018 16:27:32 -0800 Subject: [PATCH 04/51] Use constant time string comparison in FormKey validator --- .../Magento/Framework/Data/Form/FormKey/Validator.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php b/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php index 4973a2ebe50e1..99ae484977bfc 100644 --- a/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php +++ b/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php @@ -5,6 +5,11 @@ */ namespace Magento\Framework\Data\Form\FormKey; +use Magento\Framework\Encryption\Helper\Security; + +/** + * @api + */ class Validator { /** @@ -29,9 +34,11 @@ public function __construct(\Magento\Framework\Data\Form\FormKey $formKey) public function validate(\Magento\Framework\App\RequestInterface $request) { $formKey = $request->getParam('form_key', null); - if (!$formKey || $formKey !== $this->_formKey->getFormKey()) { + + if (!$formKey) { return false; } - return true; + + return Security::compareStrings($formKey, $this->_formKey->getFormKey()); } } From 38e2133386812b2cd60bc5ca25207cd54f60c646 Mon Sep 17 00:00:00 2001 From: Vlad Veselov Date: Tue, 26 Jun 2018 11:24:12 +0300 Subject: [PATCH 05/51] Polish up implementation --- .../Magento/Framework/Data/Form/FormKey/Validator.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php b/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php index 99ae484977bfc..225ff1fd140a9 100644 --- a/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php +++ b/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php @@ -34,11 +34,7 @@ public function __construct(\Magento\Framework\Data\Form\FormKey $formKey) public function validate(\Magento\Framework\App\RequestInterface $request) { $formKey = $request->getParam('form_key', null); - - if (!$formKey) { - return false; - } - - return Security::compareStrings($formKey, $this->_formKey->getFormKey()); + + return $formKey && Security::compareStrings($formKey, $this->_formKey->getFormKey()); } } From 48e9b1b376680fce7d7867632b9b301a13f25577 Mon Sep 17 00:00:00 2001 From: Tomash Khamlai Date: Thu, 26 Jul 2018 01:31:44 +0300 Subject: [PATCH 06/51] Set proper text-aligh for the element of the Subtotal column --- .../Magento/blank/Magento_Sales/web/css/source/_email.less | 3 ++- .../Magento/luma/Magento_Sales/web/css/source/_email.less | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/_email.less b/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/_email.less index 84adec39c8892..215d7d8b322b4 100644 --- a/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/_email.less +++ b/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/_email.less @@ -203,7 +203,8 @@ text-align: center; } - .item-price { + .item-price, + .item-subtotal { text-align: right; } diff --git a/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_email.less b/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_email.less index 9a3f433618c36..3f19d1020bab9 100644 --- a/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_email.less +++ b/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_email.less @@ -207,7 +207,8 @@ text-align: center; } - .item-price { + .item-price, + .item-subtotal { text-align: right; } From d2f4820acee01f9d4a4891c0a80ec7d2df2e459c Mon Sep 17 00:00:00 2001 From: mage2pratik Date: Thu, 26 Jul 2018 21:12:54 +0530 Subject: [PATCH 07/51] Declare module namespace before template path name --- app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php | 2 +- app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php | 2 +- app/code/Magento/Payment/Block/Info/Instructions.php | 2 +- app/code/Magento/ProductAlert/Block/Email/Price.php | 2 +- app/code/Magento/ProductAlert/Block/Email/Stock.php | 2 +- app/code/Magento/Rss/Block/Feeds.php | 2 +- app/code/Magento/Sales/Block/Order/History.php | 2 +- .../Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php | 2 +- app/code/Magento/Shipping/Block/Order/Shipment.php | 2 +- app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php | 2 +- app/code/Magento/UrlRewrite/Block/Selector.php | 2 +- app/code/Magento/User/Block/Role/Tab/Edit.php | 2 +- app/code/Magento/Weee/Block/Renderer/Weee/Tax.php | 2 +- .../Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php | 2 +- app/code/Magento/Wishlist/Block/Rss/EmailLink.php | 2 +- app/code/Magento/Wishlist/Block/Share/Email/Items.php | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php b/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php index c4fe10c386645..d60348d9dc1c7 100644 --- a/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php +++ b/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php @@ -15,5 +15,5 @@ class Banktransfer extends \Magento\OfflinePayments\Block\Form\AbstractInstructi * * @var string */ - protected $_template = 'form/banktransfer.phtml'; + protected $_template = 'Magento_OfflinePayments::form/banktransfer.phtml'; } diff --git a/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php b/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php index 4e0f7d48ce09b..de0f7a57bae62 100644 --- a/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php +++ b/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php @@ -15,5 +15,5 @@ class Cashondelivery extends \Magento\OfflinePayments\Block\Form\AbstractInstruc * * @var string */ - protected $_template = 'form/cashondelivery.phtml'; + protected $_template = 'Magento_OfflinePayments::form/cashondelivery.phtml'; } diff --git a/app/code/Magento/Payment/Block/Info/Instructions.php b/app/code/Magento/Payment/Block/Info/Instructions.php index 76d18edcb47af..0cb0d749693d6 100644 --- a/app/code/Magento/Payment/Block/Info/Instructions.php +++ b/app/code/Magento/Payment/Block/Info/Instructions.php @@ -20,7 +20,7 @@ class Instructions extends \Magento\Payment\Block\Info /** * @var string */ - protected $_template = 'info/instructions.phtml'; + protected $_template = 'Magento_Payment::info/instructions.phtml'; /** * Get instructions text from order payment diff --git a/app/code/Magento/ProductAlert/Block/Email/Price.php b/app/code/Magento/ProductAlert/Block/Email/Price.php index 982b0f7f63375..0430a21dc8bfd 100644 --- a/app/code/Magento/ProductAlert/Block/Email/Price.php +++ b/app/code/Magento/ProductAlert/Block/Email/Price.php @@ -15,7 +15,7 @@ class Price extends \Magento\ProductAlert\Block\Email\AbstractEmail /** * @var string */ - protected $_template = 'email/price.phtml'; + protected $_template = 'Magento_ProductAlert::email/price.phtml'; /** * Retrieve unsubscribe url for product diff --git a/app/code/Magento/ProductAlert/Block/Email/Stock.php b/app/code/Magento/ProductAlert/Block/Email/Stock.php index 1e0a6eb278a9e..b6e745e9c540f 100644 --- a/app/code/Magento/ProductAlert/Block/Email/Stock.php +++ b/app/code/Magento/ProductAlert/Block/Email/Stock.php @@ -16,7 +16,7 @@ class Stock extends \Magento\ProductAlert\Block\Email\AbstractEmail /** * @var string */ - protected $_template = 'email/stock.phtml'; + protected $_template = 'Magento_ProductAlert::email/stock.phtml'; /** * Retrieve unsubscribe url for product diff --git a/app/code/Magento/Rss/Block/Feeds.php b/app/code/Magento/Rss/Block/Feeds.php index 62d2f988ceac0..5d06ef3519751 100644 --- a/app/code/Magento/Rss/Block/Feeds.php +++ b/app/code/Magento/Rss/Block/Feeds.php @@ -14,7 +14,7 @@ class Feeds extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'feeds.phtml'; + protected $_template = 'Magento_Rss::feeds.phtml'; /** * @var \Magento\Framework\App\Rss\RssManagerInterface diff --git a/app/code/Magento/Sales/Block/Order/History.php b/app/code/Magento/Sales/Block/Order/History.php index e4530c9c33b1f..058618332e516 100644 --- a/app/code/Magento/Sales/Block/Order/History.php +++ b/app/code/Magento/Sales/Block/Order/History.php @@ -16,7 +16,7 @@ class History extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/history.phtml'; + protected $_template = 'Magento_Sales::order/history.phtml'; /** * @var \Magento\Sales\Model\ResourceModel\Order\CollectionFactory diff --git a/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php b/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php index 9e340cc31ff17..1d3f6ad1ee5a3 100644 --- a/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php +++ b/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php @@ -10,7 +10,7 @@ class Grid extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'order/packaging/grid.phtml'; + protected $_template = 'Magento_Shipping::order/packaging/grid.phtml'; /** * Core registry diff --git a/app/code/Magento/Shipping/Block/Order/Shipment.php b/app/code/Magento/Shipping/Block/Order/Shipment.php index ee21fc1351b45..4145ee1beb6ee 100644 --- a/app/code/Magento/Shipping/Block/Order/Shipment.php +++ b/app/code/Magento/Shipping/Block/Order/Shipment.php @@ -15,7 +15,7 @@ class Shipment extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/shipment.phtml'; + protected $_template = 'Magento_Shipping::order/shipment.phtml'; /** * Core registry diff --git a/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php b/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php index a726b974eb324..157cfd1105e41 100644 --- a/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php +++ b/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php @@ -26,7 +26,7 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory /** * @var string */ - protected $_template = 'categories.phtml'; + protected $_template = 'Magento_UrlRewrite::categories.phtml'; /** * Adminhtml data diff --git a/app/code/Magento/UrlRewrite/Block/Selector.php b/app/code/Magento/UrlRewrite/Block/Selector.php index fdad01d139fc9..eaba5682034e9 100644 --- a/app/code/Magento/UrlRewrite/Block/Selector.php +++ b/app/code/Magento/UrlRewrite/Block/Selector.php @@ -18,7 +18,7 @@ class Selector extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'selector.phtml'; + protected $_template = 'Magento_UrlRewrite::selector.phtml'; /** * Set block template and get available modes diff --git a/app/code/Magento/User/Block/Role/Tab/Edit.php b/app/code/Magento/User/Block/Role/Tab/Edit.php index 96489cac07a36..b682acfb6881f 100644 --- a/app/code/Magento/User/Block/Role/Tab/Edit.php +++ b/app/code/Magento/User/Block/Role/Tab/Edit.php @@ -18,7 +18,7 @@ class Edit extends \Magento\Backend\Block\Widget\Form implements \Magento\Backen /** * @var string */ - protected $_template = 'role/edit.phtml'; + protected $_template = 'Magento_User::role/edit.phtml'; /** * Root ACL Resource diff --git a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php index 05ed8875ff9e5..142ce22510de4 100644 --- a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php +++ b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php @@ -33,7 +33,7 @@ class Tax extends \Magento\Backend\Block\Widget implements \Magento\Framework\Da /** * @var string */ - protected $_template = 'renderer/tax.phtml'; + protected $_template = 'Magento_Weee::renderer/tax.phtml'; /** * Core registry diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index 2111de987ae28..1e90fe892ea1c 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -25,7 +25,7 @@ class Layout extends \Magento\Backend\Block\Template implements \Magento\Framewo /** * @var string */ - protected $_template = 'instance/edit/layout.phtml'; + protected $_template = 'Magento_Widget::instance/edit/layout.phtml'; /** * @var \Magento\Catalog\Model\Product\Type diff --git a/app/code/Magento/Wishlist/Block/Rss/EmailLink.php b/app/code/Magento/Wishlist/Block/Rss/EmailLink.php index 23b6a334e435f..25148bbe5bc0d 100644 --- a/app/code/Magento/Wishlist/Block/Rss/EmailLink.php +++ b/app/code/Magento/Wishlist/Block/Rss/EmailLink.php @@ -19,7 +19,7 @@ class EmailLink extends Link /** * @var string */ - protected $_template = 'rss/email.phtml'; + protected $_template = 'Magento_Wishlist::rss/email.phtml'; /** * @return array diff --git a/app/code/Magento/Wishlist/Block/Share/Email/Items.php b/app/code/Magento/Wishlist/Block/Share/Email/Items.php index f0c5cea3c2962..7fb3be584347b 100644 --- a/app/code/Magento/Wishlist/Block/Share/Email/Items.php +++ b/app/code/Magento/Wishlist/Block/Share/Email/Items.php @@ -16,7 +16,7 @@ class Items extends \Magento\Wishlist\Block\AbstractBlock /** * @var string */ - protected $_template = 'email/items.phtml'; + protected $_template = 'Magento_Wishlist::email/items.phtml'; /** * Retrieve Product View URL From b335d0a24dfb2e4b33be88ab5415499c9aac114f Mon Sep 17 00:00:00 2001 From: NamrataChangani Date: Mon, 9 Jul 2018 13:36:29 +0530 Subject: [PATCH 08/51] Updated Magento_Newsletter's block file. --- app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php index ce7f601e43878..e05c408d24043 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php @@ -212,7 +212,7 @@ public function getForm() } /** - * Return return template name for JS + * Return template name for JS * * @return string */ From acdfcaa23f06c8c89eb1888793b122cc3af6f70f Mon Sep 17 00:00:00 2001 From: NamrataChangani Date: Mon, 9 Jul 2018 14:00:07 +0530 Subject: [PATCH 09/51] Corrected block name in Magento_Framework's test xml file. --- .../Framework/View/_files/layout_directives_test/group.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/group.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/group.xml index 18501ecfbbfbf..8e50fe1888104 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/group.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/group.xml @@ -9,17 +9,17 @@ - blok2 + block2 - blok3 + block3 - blok4 + block4 From 9d645b009f796217d4c43e5e7a1fad920f80954e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torben=20Ho=CC=88hn?= Date: Tue, 17 Jul 2018 19:45:28 +0200 Subject: [PATCH 10/51] hide cookie notice instead of reloading site --- app/code/Magento/Cookie/view/frontend/web/js/notices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Cookie/view/frontend/web/js/notices.js b/app/code/Magento/Cookie/view/frontend/web/js/notices.js index efbd86fdfd6f3..6fc20ae026620 100644 --- a/app/code/Magento/Cookie/view/frontend/web/js/notices.js +++ b/app/code/Magento/Cookie/view/frontend/web/js/notices.js @@ -25,7 +25,7 @@ define([ }); if ($.mage.cookies.get(this.options.cookieName)) { - window.location.reload(); + this.element.hide(); } else { window.location.href = this.options.noCookiesUrl; } From dbced450c497caeb9557555407e2d632f41045e6 Mon Sep 17 00:00:00 2001 From: "Vasiliev.A" Date: Fri, 18 May 2018 13:09:28 +0300 Subject: [PATCH 11/51] Fix confirmation for registered customer --- app/code/Magento/Newsletter/Model/Subscriber.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php index a76700bded466..0c3c3147f9283 100644 --- a/app/code/Magento/Newsletter/Model/Subscriber.php +++ b/app/code/Magento/Newsletter/Model/Subscriber.php @@ -426,13 +426,7 @@ public function subscribe($email) || $this->getStatus() == self::STATUS_NOT_ACTIVE ) { if ($isConfirmNeed === true) { - // if user subscribes own login email - confirmation is not needed - $isOwnSubscribes = $isSubscribeOwnEmail; - if ($isOwnSubscribes == true) { - $this->setStatus(self::STATUS_SUBSCRIBED); - } else { - $this->setStatus(self::STATUS_NOT_ACTIVE); - } + $this->setStatus(self::STATUS_NOT_ACTIVE); } else { $this->setStatus(self::STATUS_SUBSCRIBED); } @@ -458,9 +452,7 @@ public function subscribe($email) try { /* Save model before sending out email */ $this->save(); - if ($isConfirmNeed === true - && $isOwnSubscribes === false - ) { + if ($isConfirmNeed === true) { $this->sendConfirmationRequestEmail(); } else { $this->sendConfirmationSuccessEmail(); From e526b4ea9643e2051cdba5e5b15c124f59559722 Mon Sep 17 00:00:00 2001 From: "Vasiliev.A" Date: Fri, 18 May 2018 13:13:15 +0300 Subject: [PATCH 12/51] Fix confirmation for registered customer --- app/code/Magento/Newsletter/Model/Subscriber.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php index 0c3c3147f9283..7125d5ff687d3 100644 --- a/app/code/Magento/Newsletter/Model/Subscriber.php +++ b/app/code/Magento/Newsletter/Model/Subscriber.php @@ -417,7 +417,6 @@ public function subscribe($email) self::XML_PATH_CONFIRMATION_FLAG, \Magento\Store\Model\ScopeInterface::SCOPE_STORE ) == 1 ? true : false; - $isOwnSubscribes = false; $isSubscribeOwnEmail = $this->_customerSession->isLoggedIn() && $this->_customerSession->getCustomerDataObject()->getEmail() == $email; From 22c4e4fe262fdfac297f91214f6a3f3171133620 Mon Sep 17 00:00:00 2001 From: "Vasiliev.A" Date: Fri, 18 May 2018 14:23:42 +0300 Subject: [PATCH 13/51] Fix unit test --- .../Test/Unit/Model/SubscriberTest.php | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php index de8030a8709a3..93623ff02589e 100644 --- a/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php +++ b/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php @@ -5,6 +5,8 @@ */ namespace Magento\Newsletter\Test\Unit\Model; +use Magento\Newsletter\Model\Subscriber; + /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ @@ -134,7 +136,7 @@ public function testSubscribe() $email = 'subscriber_email@magento.com'; $this->resource->expects($this->any())->method('loadByEmail')->willReturn( [ - 'subscriber_status' => 3, + 'subscriber_status' => Subscriber::STATUS_UNSUBSCRIBED, 'subscriber_email' => $email, 'name' => 'subscriber_name' ] @@ -151,7 +153,7 @@ public function testSubscribe() $this->sendEmailCheck(); $this->resource->expects($this->atLeastOnce())->method('save')->willReturnSelf(); - $this->assertEquals(1, $this->subscriber->subscribe($email)); + $this->assertEquals(Subscriber::STATUS_NOT_ACTIVE, $this->subscriber->subscribe($email)); } public function testSubscribeNotLoggedIn() @@ -159,7 +161,7 @@ public function testSubscribeNotLoggedIn() $email = 'subscriber_email@magento.com'; $this->resource->expects($this->any())->method('loadByEmail')->willReturn( [ - 'subscriber_status' => 3, + 'subscriber_status' => Subscriber::STATUS_UNSUBSCRIBED, 'subscriber_email' => $email, 'name' => 'subscriber_name' ] @@ -176,7 +178,7 @@ public function testSubscribeNotLoggedIn() $this->sendEmailCheck(); $this->resource->expects($this->atLeastOnce())->method('save')->willReturnSelf(); - $this->assertEquals(2, $this->subscriber->subscribe($email)); + $this->assertEquals(Subscriber::STATUS_NOT_ACTIVE, $this->subscriber->subscribe($email)); } public function testUpdateSubscription() @@ -193,7 +195,7 @@ public function testUpdateSubscription() ->willReturn( [ 'subscriber_id' => 1, - 'subscriber_status' => 1 + 'subscriber_status' => Subscriber::STATUS_SUBSCRIBED ] ); $customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id'); @@ -228,7 +230,7 @@ public function testUnsubscribeCustomerById() ->willReturn( [ 'subscriber_id' => 1, - 'subscriber_status' => 1 + 'subscriber_status' => Subscriber::STATUS_SUBSCRIBED ] ); $customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id'); @@ -254,7 +256,7 @@ public function testSubscribeCustomerById() ->willReturn( [ 'subscriber_id' => 1, - 'subscriber_status' => 3 + 'subscriber_status' => Subscriber::STATUS_UNSUBSCRIBED ] ); $customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id'); @@ -280,7 +282,7 @@ public function testSubscribeCustomerById1() ->willReturn( [ 'subscriber_id' => 1, - 'subscriber_status' => 3 + 'subscriber_status' => Subscriber::STATUS_UNSUBSCRIBED ] ); $customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id'); @@ -294,7 +296,7 @@ public function testSubscribeCustomerById1() $this->scopeConfig->expects($this->atLeastOnce())->method('getValue')->with()->willReturn(true); $this->subscriber->subscribeCustomerById($customerId); - $this->assertEquals(\Magento\Newsletter\Model\Subscriber::STATUS_NOT_ACTIVE, $this->subscriber->getStatus()); + $this->assertEquals(Subscriber::STATUS_NOT_ACTIVE, $this->subscriber->getStatus()); } public function testSubscribeCustomerByIdAfterConfirmation() @@ -311,7 +313,7 @@ public function testSubscribeCustomerByIdAfterConfirmation() ->willReturn( [ 'subscriber_id' => 1, - 'subscriber_status' => 4 + 'subscriber_status' => Subscriber::STATUS_UNCONFIRMED ] ); $customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id'); @@ -323,7 +325,7 @@ public function testSubscribeCustomerByIdAfterConfirmation() $this->scopeConfig->expects($this->atLeastOnce())->method('getValue')->with()->willReturn(true); $this->subscriber->updateSubscription($customerId); - $this->assertEquals(\Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED, $this->subscriber->getStatus()); + $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $this->subscriber->getStatus()); } public function testUnsubscribe() From 414875178dbd1a187c576a3f62cfc619fef41995 Mon Sep 17 00:00:00 2001 From: vgelani Date: Fri, 27 Jul 2018 12:06:52 +0530 Subject: [PATCH 14/51] Removed API annotation --- lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php b/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php index 225ff1fd140a9..74584a1d3c0ea 100644 --- a/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php +++ b/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php @@ -7,9 +7,6 @@ use Magento\Framework\Encryption\Helper\Security; -/** - * @api - */ class Validator { /** From ff550b4a69ecf1cf161f370d9dd83b5057d4c5e4 Mon Sep 17 00:00:00 2001 From: Kaushik Chavda Date: Thu, 17 May 2018 11:33:56 +0530 Subject: [PATCH 15/51] DOBISSUE date format changed after customer tries to register with same email address. --- lib/internal/Magento/Framework/Data/Form/Filter/Date.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Data/Form/Filter/Date.php b/lib/internal/Magento/Framework/Data/Form/Filter/Date.php index 8765e136e2897..90957e5244389 100644 --- a/lib/internal/Magento/Framework/Data/Form/Filter/Date.php +++ b/lib/internal/Magento/Framework/Data/Form/Filter/Date.php @@ -75,7 +75,7 @@ public function inputFilter($value) public function outputFilter($value) { $filterInput = new \Zend_Filter_LocalizedToNormalized( - ['date_format' => DateTime::DATE_INTERNAL_FORMAT, 'locale' => $this->localeResolver->getLocale()] + ['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()] ); $filterInternal = new \Zend_Filter_NormalizedToLocalized( ['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()] From 158e9775da7474ec7caa1375753c35f1d5145550 Mon Sep 17 00:00:00 2001 From: Kaushik Chavda Date: Thu, 24 May 2018 09:56:37 +0530 Subject: [PATCH 16/51] DOBISSUE date format changed after customer tries to register with same email address. --- app/code/Magento/Customer/Block/Widget/Dob.php | 1 + lib/internal/Magento/Framework/Data/Form/Filter/Date.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Customer/Block/Widget/Dob.php b/app/code/Magento/Customer/Block/Widget/Dob.php index b45374ea50e5c..cc35d738fe93d 100644 --- a/app/code/Magento/Customer/Block/Widget/Dob.php +++ b/app/code/Magento/Customer/Block/Widget/Dob.php @@ -128,6 +128,7 @@ protected function applyOutputFilter($value) { $filter = $this->getFormFilter(); if ($filter) { + $value = date('Y-m-d',strtotime($value)); $value = $filter->outputFilter($value); } return $value; diff --git a/lib/internal/Magento/Framework/Data/Form/Filter/Date.php b/lib/internal/Magento/Framework/Data/Form/Filter/Date.php index 90957e5244389..56da15c60cbdc 100644 --- a/lib/internal/Magento/Framework/Data/Form/Filter/Date.php +++ b/lib/internal/Magento/Framework/Data/Form/Filter/Date.php @@ -75,7 +75,7 @@ public function inputFilter($value) public function outputFilter($value) { $filterInput = new \Zend_Filter_LocalizedToNormalized( - ['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()] + ['date_format' => DateTime::DATE_INTERNAL_FORMAT, 'locale' => $this->localeResolver->getLocale()] ); $filterInternal = new \Zend_Filter_NormalizedToLocalized( ['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()] @@ -85,4 +85,4 @@ public function outputFilter($value) $value = $filterInternal->filter($value); return $value; } -} +} \ No newline at end of file From 7359a16dc7848917e1f76181e70d24500e92e51b Mon Sep 17 00:00:00 2001 From: Kaushik Chavda Date: Thu, 24 May 2018 10:04:20 +0530 Subject: [PATCH 17/51] DOBISSUE date format changed after customer tries to register with same email address. --- app/code/Magento/Customer/Block/Widget/Dob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Block/Widget/Dob.php b/app/code/Magento/Customer/Block/Widget/Dob.php index cc35d738fe93d..7fa26671b3cf4 100644 --- a/app/code/Magento/Customer/Block/Widget/Dob.php +++ b/app/code/Magento/Customer/Block/Widget/Dob.php @@ -128,7 +128,7 @@ protected function applyOutputFilter($value) { $filter = $this->getFormFilter(); if ($filter) { - $value = date('Y-m-d',strtotime($value)); + $value = date('Y-m-d', $this->getTime()); $value = $filter->outputFilter($value); } return $value; From f49cf3d77288160705dd2211ec5d8f9cacf00277 Mon Sep 17 00:00:00 2001 From: Kaushik Chavda Date: Thu, 24 May 2018 13:41:10 +0530 Subject: [PATCH 18/51] DOBISSUE fix travis-ci error. --- lib/internal/Magento/Framework/Data/Form/Filter/Date.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Data/Form/Filter/Date.php b/lib/internal/Magento/Framework/Data/Form/Filter/Date.php index 56da15c60cbdc..8765e136e2897 100644 --- a/lib/internal/Magento/Framework/Data/Form/Filter/Date.php +++ b/lib/internal/Magento/Framework/Data/Form/Filter/Date.php @@ -85,4 +85,4 @@ public function outputFilter($value) $value = $filterInternal->filter($value); return $value; } -} \ No newline at end of file +} From f08d93215d5aa530f8f0c7b5f8dfb523e45d299d Mon Sep 17 00:00:00 2001 From: Kaushik Chavda Date: Wed, 13 Jun 2018 11:47:47 +0530 Subject: [PATCH 19/51] DOBUSSUE fixed On Create New Customer Account page DOB field always contains default date "1/1/1970" instead of empty field. --- app/code/Magento/Customer/Block/Widget/Dob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Block/Widget/Dob.php b/app/code/Magento/Customer/Block/Widget/Dob.php index 7fa26671b3cf4..021e02d7c87c9 100644 --- a/app/code/Magento/Customer/Block/Widget/Dob.php +++ b/app/code/Magento/Customer/Block/Widget/Dob.php @@ -127,7 +127,7 @@ protected function getFormFilter() protected function applyOutputFilter($value) { $filter = $this->getFormFilter(); - if ($filter) { + if ($filter && $value) { $value = date('Y-m-d', $this->getTime()); $value = $filter->outputFilter($value); } From 1ed15d2b78df252a37d643bd59ea1a8bd61a3fff Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 19 Jun 2018 21:51:55 +0200 Subject: [PATCH 20/51] Filter test result collection with the cron job code defined in the config fixture. Set the schedule for every minute so that the job is scheduled regardless of the time when you run the test. --- .../Magento/Cron/Observer/ProcessCronQueueObserverTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php index 107bf8ae14bb9..6216cfb473628 100644 --- a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php @@ -27,7 +27,7 @@ protected function setUp() } /** - * @magentoConfigFixture current_store crontab/default/jobs/catalog_product_alert/schedule/cron_expr 8 * * * * + * @magentoConfigFixture current_store crontab/default/jobs/catalog_product_alert/schedule/cron_expr * * * * * */ public function testDispatchScheduled() { @@ -35,6 +35,7 @@ public function testDispatchScheduled() 'Magento\Cron\Model\ResourceModel\Schedule\Collection' ); $collection->addFieldToFilter('status', \Magento\Cron\Model\Schedule::STATUS_PENDING); + $collection->addFieldToFilter('job_code', 'catalog_product_alert'); $this->assertGreaterThan(0, $collection->count(), 'Cron has failed to schedule tasks for itself for future.'); } From 5a99111e02b2918da51dc6cbf370da082ffbb7b8 Mon Sep 17 00:00:00 2001 From: mage2pratik Date: Fri, 27 Jul 2018 21:26:16 +0530 Subject: [PATCH 21/51] Fixed a grammatical error on the vault tooltip --- .../Braintree/view/frontend/web/template/payment/form.html | 2 +- .../Braintree/view/frontend/web/template/payment/paypal.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Braintree/view/frontend/web/template/payment/form.html b/app/code/Magento/Braintree/view/frontend/web/template/payment/form.html index 113e051b7fb48..86f6bf85b6da6 100644 --- a/app/code/Magento/Braintree/view/frontend/web/template/payment/form.html +++ b/app/code/Magento/Braintree/view/frontend/web/template/payment/form.html @@ -122,7 +122,7 @@
+ translate="'We store your payment information securely on Braintree servers via SSL.'"> diff --git a/app/code/Magento/Braintree/view/frontend/web/template/payment/paypal.html b/app/code/Magento/Braintree/view/frontend/web/template/payment/paypal.html index ae1df2a195d35..3f69fae2afa41 100644 --- a/app/code/Magento/Braintree/view/frontend/web/template/payment/paypal.html +++ b/app/code/Magento/Braintree/view/frontend/web/template/payment/paypal.html @@ -45,7 +45,7 @@
+ translate="'We store your payment information securely on Braintree servers via SSL.'"> From 15ff4d2556a18d7e0d2fca1e90d126f3e9f19e8f Mon Sep 17 00:00:00 2001 From: Angelo Maragna Date: Wed, 25 Jul 2018 14:50:49 +0100 Subject: [PATCH 22/51] Update template.js Uniform jquery variable to "$" as this javascript is partially using "jquery" and partially "$". The line 62 will cause an error in Internet Explorer if $ is not declared. --- lib/web/mage/utils/template.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web/mage/utils/template.js b/lib/web/mage/utils/template.js index 619f93229f61a..5bf9e6a4d8ad5 100644 --- a/lib/web/mage/utils/template.js +++ b/lib/web/mage/utils/template.js @@ -7,7 +7,7 @@ define([ 'underscore', 'mage/utils/objects', 'mage/utils/strings' -], function (jQuery, _, utils, stringUtils) { +], function ($, _, utils, stringUtils) { 'use strict'; var tmplSettings = _.templateSettings, @@ -172,7 +172,7 @@ define([ if (isTemplate(value)) { list[key] = render(value, tmpl, castString); - } else if (jQuery.isPlainObject(value) || Array.isArray(value)) { + } else if ($.isPlainObject(value) || Array.isArray(value)) { _.each(value, iterate); } }); From da9afe669e96f9aca6d4e39283a8a005165e1825 Mon Sep 17 00:00:00 2001 From: Eugene Tulika Date: Thu, 19 Oct 2017 11:38:39 -0400 Subject: [PATCH 23/51] MAGETWO-81310: Fixed ability to set field config from layout xml #11302 --- .../Block/Checkout/AttributeMerger.php | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php index 5ce0544097a26..54e52741bc0a4 100644 --- a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php +++ b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php @@ -164,20 +164,19 @@ protected function getFieldConfig( $element = [ 'component' => isset($additionalConfig['component']) ? $additionalConfig['component'] : $uiComponent, - 'config' => [ - // customScope is used to group elements within a single form (e.g. they can be validated separately) - 'customScope' => $dataScopePrefix, - 'customEntry' => isset($additionalConfig['config']['customEntry']) - ? $additionalConfig['config']['customEntry'] - : null, - 'template' => 'ui/form/field', - 'elementTmpl' => isset($additionalConfig['config']['elementTmpl']) - ? $additionalConfig['config']['elementTmpl'] - : $elementTemplate, - 'tooltip' => isset($additionalConfig['config']['tooltip']) - ? $additionalConfig['config']['tooltip'] - : null - ], + 'config' => $this->mergeConfigurationNode( + 'config', + $additionalConfig, + [ + 'config' => [ + // customScope is used to group elements within a single + // form (e.g. they can be validated separately) + 'customScope' => $dataScopePrefix, + 'template' => 'ui/form/field', + 'elementTmpl' => $elementTemplate, + ], + ] + ), 'dataScope' => $dataScopePrefix . '.' . $attributeCode, 'label' => $attributeConfig['label'], 'provider' => $providerName, From 6702cdce13957b10dbf29a4a00e17eba6f97c982 Mon Sep 17 00:00:00 2001 From: Cristian Sanclemente Date: Thu, 19 Oct 2017 15:49:16 +0200 Subject: [PATCH 24/51] get language code --- lib/internal/Magento/Framework/View/Page/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Page/Config.php b/lib/internal/Magento/Framework/View/Page/Config.php index aafb5eda9b617..529f8b02e0635 100644 --- a/lib/internal/Magento/Framework/View/Page/Config.php +++ b/lib/internal/Magento/Framework/View/Page/Config.php @@ -174,7 +174,7 @@ public function __construct( $this->setElementAttribute( self::ELEMENT_TYPE_HTML, self::HTML_ATTRIBUTE_LANG, - str_replace('_', '-', $this->localeResolver->getLocale()) + strstr($this->localeResolver->getLocale(), '_', true) ); } From 50f4051c1a38dd1eba1e2a210e68e6771534ba82 Mon Sep 17 00:00:00 2001 From: Prince Patel Date: Sat, 28 Jul 2018 01:20:39 +0530 Subject: [PATCH 25/51] Update rules.js --- app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js index 8104d4883dce6..00de03ba69647 100644 --- a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js +++ b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js @@ -316,7 +316,7 @@ define([ ], "pattern": [ function(value, param) { - return param.test(value); + return new RegExp(param).test(value); }, $.mage.__('Invalid format.') ], From 189a7b19b4f048baf5c331d4b63d8242026bac04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Corr=C3=AAa=20Gomes?= Date: Fri, 20 Jul 2018 23:55:49 -0300 Subject: [PATCH 26/51] Categories > Left menu > Item title space fix --- .../Magento/luma/Magento_Customer/web/css/source/_module.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 app/design/frontend/Magento/luma/Magento_Customer/web/css/source/_module.less diff --git a/app/design/frontend/Magento/luma/Magento_Customer/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Customer/web/css/source/_module.less old mode 100644 new mode 100755 index aa86872dbb49e..bb4728aacf49c --- a/app/design/frontend/Magento/luma/Magento_Customer/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_Customer/web/css/source/_module.less @@ -198,7 +198,7 @@ .column.main & { } } - + display: block; margin-bottom: @indent__s; } From f6dbc7a5abab5ff4ee6721900e3b01a101bc5a38 Mon Sep 17 00:00:00 2001 From: Rodrigo Biassi Date: Fri, 20 Jul 2018 19:41:35 -0300 Subject: [PATCH 27/51] Broken Responsive Layout on Top --- .../luma/Magento_Theme/web/css/source/_module.less | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/design/frontend/Magento/luma/Magento_Theme/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Theme/web/css/source/_module.less index 3342a868aaca3..94b9629864142 100644 --- a/app/design/frontend/Magento/luma/Magento_Theme/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_Theme/web/css/source/_module.less @@ -420,6 +420,17 @@ } } +// +// Mobile +// _____________________________________________ + +.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) { + .cms-page-view .page-main { + padding-top: 41px; + position: relative; + } +} + // // Desktop // _____________________________________________ From b50caeb31de1c71a44d4a52af980494126246575 Mon Sep 17 00:00:00 2001 From: Alexander Kras'ko <0m3r.mail@gmail.com> Date: Wed, 27 Jun 2018 16:56:34 +0300 Subject: [PATCH 28/51] Update sidebar.js --- app/code/Magento/Checkout/view/frontend/web/js/sidebar.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js index b529e869a1a5a..86db8763677b5 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js @@ -77,8 +77,12 @@ define([ confirm: function () { self._removeItem($(event.currentTarget)); }, - always: function (event) { - event.stopImmediatePropagation(); + + /** @inheritdoc */ + always: function (e) { + if (e && typeof e.stopImmediatePropagation === 'function') { + e.stopImmediatePropagation(); + } } } }); From 540cdb5e13097fbf3ffd5edd7a23beb8d88e12f2 Mon Sep 17 00:00:00 2001 From: Alexander Kras'ko Date: Mon, 2 Jul 2018 10:02:03 +0300 Subject: [PATCH 29/51] Fix for #14593 (duo over) --- app/code/Magento/Ui/view/base/web/js/modal/modal.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/modal.js b/app/code/Magento/Ui/view/base/web/js/modal/modal.js index b2ce644afce45..05a8f68f845d4 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/modal.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/modal.js @@ -100,11 +100,12 @@ define([ /** * Escape key press handler, * close modal window + * @param {Object} event - event */ - escapeKey: function () { + escapeKey: function (event) { if (this.options.isOpen && this.modal.find(document.activeElement).length || this.options.isOpen && this.modal[0] === document.activeElement) { - this.closeModal(); + this.closeModal(event); } } } From d937ca701cd217d959b43f009e192c69cd90a595 Mon Sep 17 00:00:00 2001 From: Alexander Kras'ko Date: Mon, 2 Jul 2018 10:10:04 +0300 Subject: [PATCH 30/51] Restore sidebar.js --- app/code/Magento/Checkout/view/frontend/web/js/sidebar.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js index 86db8763677b5..d9a4ef7989c24 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js @@ -80,9 +80,7 @@ define([ /** @inheritdoc */ always: function (e) { - if (e && typeof e.stopImmediatePropagation === 'function') { - e.stopImmediatePropagation(); - } + e.stopImmediatePropagation(); } } }); From 9c4dfbdfb72ef350ad1d5eb0d6d4a04c2ffb92ab Mon Sep 17 00:00:00 2001 From: Joseph Maxwell Date: Wed, 27 Jun 2018 16:21:02 -0500 Subject: [PATCH 31/51] Credit memo email template file: fixing incorrect object type error --- .../frontend/templates/email/items/creditmemo/default.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml index 5b701762e04a2..76dc55b9c8787 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml @@ -31,6 +31,6 @@ getQty() * 1 ?> - getItemPrice($_item); ?> + getItemPrice($_item->getOrderItem()) ?> From 92f6cbc244273c2c7f27745e3f33f1facb305f7d Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Mon, 11 Jun 2018 13:08:29 +0200 Subject: [PATCH 32/51] fix: change "My Dashboard" to "My Account" --- app/code/Magento/Customer/i18n/en_US.csv | 1 - .../Customer/view/frontend/layout/customer_account_index.xml | 2 +- .../Test/Constraint/AssertCustomerRedirectToDashboard.php | 2 +- .../Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Customer/i18n/en_US.csv b/app/code/Magento/Customer/i18n/en_US.csv index ab7df0a3aa514..e4654c84005f6 100644 --- a/app/code/Magento/Customer/i18n/en_US.csv +++ b/app/code/Magento/Customer/i18n/en_US.csv @@ -515,7 +515,6 @@ Addresses,Addresses "Account Dashboard","Account Dashboard" "Edit Account Information","Edit Account Information" "Password forgotten","Password forgotten" -"My Dashboard","My Dashboard" "You are signed out","You are signed out" "No Password","No Password" "Weak","Weak" diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml index 1c9a142fda351..e4ba073731839 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml @@ -10,7 +10,7 @@ - My Dashboard + My Account diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php index e5201d18b3fd4..96c3c3933cc07 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php @@ -17,7 +17,7 @@ class AssertCustomerRedirectToDashboard extends AbstractConstraint /** * Dashboard Message on account index page. */ - const DASHBOARD_MESSAGE = 'My Dashboard'; + const DASHBOARD_MESSAGE = 'My Account'; /** * Constraint severeness diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php index df14db909a8f6..22cd5bd13e94c 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php @@ -49,7 +49,7 @@ public function run() { $this->customerAccount->open(); $this->cmsIndex->getCmsPageBlock()->waitPageInit(); - if ($this->cmsIndex->getTitleBlock()->getTitle() != 'Customer Login') { + if ($this->cmsIndex->getTitleBlock()->getTitle() === 'My Account') { $this->cmsIndex->getLinksBlock()->openLink('Sign Out'); $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page'); $this->cmsIndex->getCmsPageBlock()->waitPageInit(); From 6095013a6176f2a3a551741323090fe5d8a30879 Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Mon, 2 Jul 2018 10:34:12 +0200 Subject: [PATCH 33/51] fix: change "Account Dashboard" to "My Account" --- .../Customer/etc/frontend/page_types.xml | 2 +- app/code/Magento/Customer/i18n/en_US.csv | 1 - .../view/frontend/layout/customer_account.xml | 31 +++++++++++++++++++ .../frontend/Magento/blank/i18n/en_US.csv | 1 - .../layout/customer_account.xml | 4 +-- .../frontend/Magento/luma/i18n/en_US.csv | 3 ++ .../AssertCustomerDefaultAddresses.php | 2 +- 7 files changed, 38 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Customer/etc/frontend/page_types.xml b/app/code/Magento/Customer/etc/frontend/page_types.xml index 2c0feeac532a1..a49d735b4467e 100644 --- a/app/code/Magento/Customer/etc/frontend/page_types.xml +++ b/app/code/Magento/Customer/etc/frontend/page_types.xml @@ -11,7 +11,7 @@ - + diff --git a/app/code/Magento/Customer/i18n/en_US.csv b/app/code/Magento/Customer/i18n/en_US.csv index e4654c84005f6..ed33d30d93b9d 100644 --- a/app/code/Magento/Customer/i18n/en_US.csv +++ b/app/code/Magento/Customer/i18n/en_US.csv @@ -512,7 +512,6 @@ Type,Type "Send Welcome Email From","Send Welcome Email From" Addresses,Addresses "Are you sure you want to delete this item?","Are you sure you want to delete this item?" -"Account Dashboard","Account Dashboard" "Edit Account Information","Edit Account Information" "Password forgotten","Password forgotten" "You are signed out","You are signed out" diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account.xml index dd972321f27e2..1260401d5061f 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account.xml @@ -30,6 +30,37 @@ Address Book customer/address + + + My Account + customer/account + 250 + + + + + 200 + + + + + Address Book + customer/address + 190 + + + + + Account Information + customer/account/edit + 180 + + + + + 130 + + diff --git a/app/design/frontend/Magento/blank/i18n/en_US.csv b/app/design/frontend/Magento/blank/i18n/en_US.csv index b9a1d343b7f2d..a491a567a3777 100644 --- a/app/design/frontend/Magento/blank/i18n/en_US.csv +++ b/app/design/frontend/Magento/blank/i18n/en_US.csv @@ -1,5 +1,4 @@ Summary,Summary -"Account Dashboard","Account Dashboard" "Account Information","Account Information" "Address Book","Address Book" Menu,Menu diff --git a/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml b/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml index e64adea22f636..b27d996b6c12f 100644 --- a/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml +++ b/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml @@ -10,7 +10,7 @@ - Account Dashboard + My Account block-collapsible-nav @@ -19,7 +19,7 @@ - Account Dashboard + My Account customer/account diff --git a/app/design/frontend/Magento/luma/i18n/en_US.csv b/app/design/frontend/Magento/luma/i18n/en_US.csv index 6f79508746d9d..2146cb8fc24b6 100644 --- a/app/design/frontend/Magento/luma/i18n/en_US.csv +++ b/app/design/frontend/Magento/luma/i18n/en_US.csv @@ -42,3 +42,6 @@ Password:,Password: "Placed on %created_at","Placed on %created_at" "Your shipping confirmation is below. Thank you again for your business.","Your shipping confirmation is below. Thank you again for your business." "Your Shipment #%shipment_id for Order #%order_id","Your Shipment #%shipment_id for Order #%order_id" +"Update to your %store_name shipment","Update to your %store_name shipment" +"Address Book","Address Book" +"Account Information","Account Information" diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php index 07e4717fda4a6..c130af57c48b7 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php @@ -24,7 +24,7 @@ class AssertCustomerDefaultAddresses extends AbstractConstraint */ public function processAssert(CustomerAccountIndex $customerAccountIndex, Address $address) { - $customerAccountIndex->getAccountMenuBlock()->openMenuItem('Account Dashboard'); + $customerAccountIndex->getAccountMenuBlock()->openMenuItem('My Account'); sleep(6); $defaultBillingAddress = explode( "\n", From ebe636d8931407fe0bcf0376e4820810c81a4cf4 Mon Sep 17 00:00:00 2001 From: mage2pratik Date: Tue, 24 Jul 2018 21:28:49 +0530 Subject: [PATCH 34/51] Remove commented code --- .../Review/Model/ResourceModel/Rating/Collection.php | 1 - app/code/Magento/Sales/Model/Order/Creditmemo.php | 7 ------- .../Magento/Framework/Data/Form/Element/Checkboxes.php | 8 -------- .../Model/ResourceModel/Db/Relation/ActionPool.php | 3 --- 4 files changed, 19 deletions(-) diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php index 18eb38ea72d38..0a82fb871339d 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php @@ -138,7 +138,6 @@ public function setStoreFilter($storeId) 'main_table.rating_id = store.rating_id', [] ); - // ->group('main_table.rating_id') $this->_isStoreJoined = true; } $inCondition = $connection->prepareSqlCondition('store.store_id', ['in' => $storeId]); diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Creditmemo.php index 2adbece5d89f4..6d6117290292b 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo.php @@ -475,13 +475,6 @@ public function getStateName($stateId = null) */ public function setShippingAmount($amount) { - // base shipping amount calculated in total model - // $amount = $this->getStore()->round($amount); - // $this->setData('base_shipping_amount', $amount); - // - // $amount = $this->getStore()->round( - // $amount*$this->getOrder()->getStoreToOrderRate() - // ); return $this->setData(CreditmemoInterface::SHIPPING_AMOUNT, $amount); } diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php b/lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php index 76bc4fce5f95c..3048be4d5dc1b 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php @@ -178,14 +178,6 @@ public function getOnchange($value) return; } - // public function getName($value) - // { - // if ($name = $this->getData('name')) { - // return str_replace('$value', $value, $name); - // } - // return ; - // } - /** * @param array $option * @return string diff --git a/lib/internal/Magento/Framework/Model/ResourceModel/Db/Relation/ActionPool.php b/lib/internal/Magento/Framework/Model/ResourceModel/Db/Relation/ActionPool.php index 433762556693d..781f96585dd50 100644 --- a/lib/internal/Magento/Framework/Model/ResourceModel/Db/Relation/ActionPool.php +++ b/lib/internal/Magento/Framework/Model/ResourceModel/Db/Relation/ActionPool.php @@ -50,9 +50,6 @@ public function getActions($entityType, $actionName) } foreach ($this->relationActions[$entityType][$actionName] as $actionClassName) { $action = $this->objectManager->get($actionClassName); - //if (!$action instanceof ProcessEntityRelationInterface) { - // throw new \Exception('Not compliant with action interface'); - //} $actions[] = $action; } return $actions; From e06e7ac7b0db33d1af6a912281042c1a7b29389c Mon Sep 17 00:00:00 2001 From: Valerij Ivashchenko Date: Fri, 20 Jul 2018 20:01:29 +0300 Subject: [PATCH 35/51] fix misprint ('_requesetd' > '_requested') --- .../Magento/Ui/view/base/web/js/lib/core/element/element.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/lib/core/element/element.js b/app/code/Magento/Ui/view/base/web/js/lib/core/element/element.js index dfae2b9da9501..7d2a54e805748 100644 --- a/app/code/Magento/Ui/view/base/web/js/lib/core/element/element.js +++ b/app/code/Magento/Ui/view/base/web/js/lib/core/element/element.js @@ -62,7 +62,7 @@ define([ Element = _.extend({ defaults: { - _requesetd: {}, + _requested: {}, containers: [], exports: {}, imports: {}, @@ -245,7 +245,7 @@ define([ * @returns {Function} Async module wrapper. */ requestModule: function (name) { - var requested = this._requesetd; + var requested = this._requested; if (!requested[name]) { requested[name] = registry.async(name); From b957e32368fc27b804b4bcc3dc2c283d0aeb14b5 Mon Sep 17 00:00:00 2001 From: tejash Date: Fri, 20 Jul 2018 14:30:31 +0530 Subject: [PATCH 36/51] Mobile device style groups incorrect order --- lib/web/css/source/lib/_responsive.less | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/web/css/source/lib/_responsive.less b/lib/web/css/source/lib/_responsive.less index d1bbbae7f6875..efb706f85eac0 100644 --- a/lib/web/css/source/lib/_responsive.less +++ b/lib/web/css/source/lib/_responsive.less @@ -27,24 +27,24 @@ & when (@media-target = 'mobile'), (@media-target = 'all') { - @media only screen and (max-width: (@screen__xxs - 1)) { - .media-width('max', @screen__xxs); + @media only screen and (max-width: @screen__m) { + .media-width('max', (@screen__m + 1)); } - @media only screen and (max-width: (@screen__xs - 1)) { - .media-width('max', @screen__xs); + @media only screen and (max-width: (@screen__m - 1)) { + .media-width('max', @screen__m); } @media only screen and (max-width: (@screen__s - 1)) { .media-width('max', @screen__s); } - @media only screen and (max-width: (@screen__m - 1)) { - .media-width('max', @screen__m); + @media only screen and (max-width: (@screen__xs - 1)) { + .media-width('max', @screen__xs); } - @media only screen and (max-width: @screen__m) { - .media-width('max', (@screen__m + 1)); + @media only screen and (max-width: (@screen__xxs - 1)) { + .media-width('max', @screen__xxs); } @media all and (min-width: @screen__s) { From 5685d19c1535a2afee9ab731f73deeee817fbe8b Mon Sep 17 00:00:00 2001 From: Andrew Howden Date: Tue, 17 Oct 2017 12:44:36 +0200 Subject: [PATCH 37/51] Modify Report processor to return 500 The report processor is currently returning a HTTP 503 status code; generally used for temporarily failures to connect to a service such as when that service is in maintenance mode, when an upstream proxy is unavailable etc. This commit modifies the report HTTP code to be a 500. The author believes this to be a better reflection that the error is miscellaneous in nature, and that action is required in order to change it (i.e. it is not a temporary condition) --- pub/errors/processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pub/errors/processor.php b/pub/errors/processor.php index 231c13dcfe0c4..2ee52de447d2f 100644 --- a/pub/errors/processor.php +++ b/pub/errors/processor.php @@ -203,7 +203,7 @@ public function process503() public function processReport() { $this->pageTitle = 'There has been an error processing your request'; - $this->_response->setHttpResponseCode(503); + $this->_response->setHttpResponseCode(500); $this->showErrorMsg = false; $this->showSentMsg = false; From 1220688b38697f22b7c4d46de7c84eafecf3c54d Mon Sep 17 00:00:00 2001 From: Jeroen Date: Fri, 22 Sep 2017 10:43:38 +0200 Subject: [PATCH 38/51] Add VAT number to email source variables --- app/code/Magento/Email/Model/Source/Variables.php | 1 + app/code/Magento/Email/Test/Unit/Model/Source/VariablesTest.php | 1 + app/code/Magento/Email/i18n/en_US.csv | 1 + 3 files changed, 3 insertions(+) diff --git a/app/code/Magento/Email/Model/Source/Variables.php b/app/code/Magento/Email/Model/Source/Variables.php index 65296fea60c02..b7cb1dfb2aead 100644 --- a/app/code/Magento/Email/Model/Source/Variables.php +++ b/app/code/Magento/Email/Model/Source/Variables.php @@ -49,6 +49,7 @@ public function __construct() ['value' => 'general/store_information/city', 'label' => __('City')], ['value' => 'general/store_information/street_line1', 'label' => __('Street Address 1')], ['value' => 'general/store_information/street_line2', 'label' => __('Street Address 2')], + ['value' => 'general/store_information/merchant_vat_number', 'label' => __('VAT Number')], ]; } diff --git a/app/code/Magento/Email/Test/Unit/Model/Source/VariablesTest.php b/app/code/Magento/Email/Test/Unit/Model/Source/VariablesTest.php index 0406c399cf57a..225b63da7ce81 100644 --- a/app/code/Magento/Email/Test/Unit/Model/Source/VariablesTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/Source/VariablesTest.php @@ -53,6 +53,7 @@ protected function setup() ['value' => 'general/store_information/city', 'label' => __('City')], ['value' => 'general/store_information/street_line1', 'label' => __('Street Address 1')], ['value' => 'general/store_information/street_line2', 'label' => __('Street Address 2')], + ['value' => 'general/store_information/merchant_vat_number', 'label' => __('VAT Number')], ]; } diff --git a/app/code/Magento/Email/i18n/en_US.csv b/app/code/Magento/Email/i18n/en_US.csv index 58a26aa31cd66..23d86c1fefd11 100644 --- a/app/code/Magento/Email/i18n/en_US.csv +++ b/app/code/Magento/Email/i18n/en_US.csv @@ -54,6 +54,7 @@ Region/State,Region/State City,City "Street Address 1","Street Address 1" "Street Address 2","Street Address 2" +"VAT Number","VAT Number" "Store Contact Information","Store Contact Information" %1,%1 "Template Variables","Template Variables" From c5d85e0cfbd7e38461a782c43eef69805a430b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sylvain=20Raye=CC=81?= Date: Sat, 14 Oct 2017 15:01:07 +0200 Subject: [PATCH 39/51] Skip store code admin from being detected in case of store code in url configured --- app/code/Magento/Store/App/Request/PathInfoProcessor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Store/App/Request/PathInfoProcessor.php b/app/code/Magento/Store/App/Request/PathInfoProcessor.php index ebea50588f9e5..9a09b78129a54 100644 --- a/app/code/Magento/Store/App/Request/PathInfoProcessor.php +++ b/app/code/Magento/Store/App/Request/PathInfoProcessor.php @@ -6,6 +6,7 @@ namespace Magento\Store\App\Request; use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Store\Model\Store; class PathInfoProcessor implements \Magento\Framework\App\Request\PathInfoProcessorInterface { @@ -42,7 +43,7 @@ public function process(\Magento\Framework\App\RequestInterface $request, $pathI } if ($store->isUseStoreInUrl()) { - if (!$request->isDirectAccessFrontendName($storeCode)) { + if (!$request->isDirectAccessFrontendName($storeCode) && $storeCode != Store::ADMIN_CODE ) { $this->storeManager->setCurrentStore($storeCode); $pathInfo = '/' . (isset($pathParts[1]) ? $pathParts[1] : ''); return $pathInfo; From f9696c964d21a3cfef60cffa6b23edf9a1a6be59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sylvain=20Ray=C3=A9?= Date: Sun, 15 Oct 2017 10:52:55 +0200 Subject: [PATCH 40/51] Update PathInfoProcessor.php Prevent PHPCBF Error --- app/code/Magento/Store/App/Request/PathInfoProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Store/App/Request/PathInfoProcessor.php b/app/code/Magento/Store/App/Request/PathInfoProcessor.php index 9a09b78129a54..a38ea6d1272e8 100644 --- a/app/code/Magento/Store/App/Request/PathInfoProcessor.php +++ b/app/code/Magento/Store/App/Request/PathInfoProcessor.php @@ -43,7 +43,7 @@ public function process(\Magento\Framework\App\RequestInterface $request, $pathI } if ($store->isUseStoreInUrl()) { - if (!$request->isDirectAccessFrontendName($storeCode) && $storeCode != Store::ADMIN_CODE ) { + if (!$request->isDirectAccessFrontendName($storeCode) && $storeCode != Store::ADMIN_CODE) { $this->storeManager->setCurrentStore($storeCode); $pathInfo = '/' . (isset($pathParts[1]) ? $pathParts[1] : ''); return $pathInfo; From f1120da9b3d98120a8e0f849c984f3599f0fa603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20P=C3=A9rez?= Date: Tue, 17 Jul 2018 12:36:34 +0200 Subject: [PATCH 41/51] FIXED: FTP user and password strings urldecoded --- lib/internal/Magento/Framework/System/Ftp.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/internal/Magento/Framework/System/Ftp.php b/lib/internal/Magento/Framework/System/Ftp.php index 216026be8d72e..c56f5c669d3c9 100644 --- a/lib/internal/Magento/Framework/System/Ftp.php +++ b/lib/internal/Magento/Framework/System/Ftp.php @@ -107,6 +107,11 @@ public function validateConnectionString($string) if ($data['scheme'] != 'ftp') { throw new \Exception("Support for scheme unsupported: '{$data['scheme']}'"); } + + // Decode user & password strings from URL + if ( array_key_exists('user', $data) ) $data['user'] = urldecode($data['user']); + if ( array_key_exists('pass', $data) ) $data['pass'] = urldecode($data['pass']); + return $data; } From cd7fbb6bacaf03a32a9b9df8b3518c3ed097c614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20P=C3=A9rez?= Date: Wed, 18 Jul 2018 14:10:33 +0200 Subject: [PATCH 42/51] Fixed: urldecode user & pass from FTP connection string recoding to pass travis coding standards --- lib/internal/Magento/Framework/System/Ftp.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/System/Ftp.php b/lib/internal/Magento/Framework/System/Ftp.php index c56f5c669d3c9..827e524a62464 100644 --- a/lib/internal/Magento/Framework/System/Ftp.php +++ b/lib/internal/Magento/Framework/System/Ftp.php @@ -109,8 +109,9 @@ public function validateConnectionString($string) } // Decode user & password strings from URL - if ( array_key_exists('user', $data) ) $data['user'] = urldecode($data['user']); - if ( array_key_exists('pass', $data) ) $data['pass'] = urldecode($data['pass']); + foreach (array_intersect(array_keys($data), ['user','pass']) as $key) { + $data[$key] = urldecode($data[$key]); + } return $data; } From 5b969471f8a656a077959a40dbfeef26b4411dfe Mon Sep 17 00:00:00 2001 From: Vishal Gelani Date: Sun, 29 Jul 2018 07:10:07 +0530 Subject: [PATCH 43/51] Update customer_account.xml --- .../view/frontend/layout/customer_account.xml | 33 +------------------ 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account.xml index 1260401d5061f..27000dc013412 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account.xml @@ -15,7 +15,7 @@ - Account Dashboard + My Account customer/account @@ -30,37 +30,6 @@ Address Book customer/address - - - My Account - customer/account - 250 - - - - - 200 - - - - - Address Book - customer/address - 190 - - - - - Account Information - customer/account/edit - 180 - - - - - 130 - - From 79b43541bd4a2e28c2cf1e0a246c4a0862b198e8 Mon Sep 17 00:00:00 2001 From: mage2pratik Date: Sun, 29 Jul 2018 18:25:16 +0530 Subject: [PATCH 44/51] Fixed a grammatical error on the vault tooltip --- .../Braintree/view/frontend/web/template/payment/form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Braintree/view/frontend/web/template/payment/form.html b/app/code/Magento/Braintree/view/frontend/web/template/payment/form.html index 86f6bf85b6da6..113e051b7fb48 100644 --- a/app/code/Magento/Braintree/view/frontend/web/template/payment/form.html +++ b/app/code/Magento/Braintree/view/frontend/web/template/payment/form.html @@ -122,7 +122,7 @@
+ translate="'We store you payment information securely on Braintree servers via SSL.'"> From 63337482d110de541eec921160b46ebd7868e09d Mon Sep 17 00:00:00 2001 From: Wouter Samaey Date: Wed, 25 Jul 2018 14:34:38 +0200 Subject: [PATCH 45/51] Using interface instead of model directly --- app/code/Magento/Theme/etc/di.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Theme/etc/di.xml b/app/code/Magento/Theme/etc/di.xml index e7cc5b9469db3..eb049033194cc 100644 --- a/app/code/Magento/Theme/etc/di.xml +++ b/app/code/Magento/Theme/etc/di.xml @@ -94,7 +94,7 @@ - Magento\Framework\Translate + Magento\Framework\TranslateInterface Magento\Theme\Model\Design\Proxy From 0cacd45010bcc8968ca79d58c5a65d1d2e1a2e51 Mon Sep 17 00:00:00 2001 From: mage2pratik Date: Sun, 29 Jul 2018 23:56:07 +0530 Subject: [PATCH 46/51] Add meta NOINDEX,NOFOLLOW to admin scope to avoid accidental crawling --- .../adminhtml/Magento/backend/Magento_Backend/layout/default.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/design/adminhtml/Magento/backend/Magento_Backend/layout/default.xml b/app/design/adminhtml/Magento/backend/Magento_Backend/layout/default.xml index 88f96f04785b3..daa9f6aa07315 100644 --- a/app/design/adminhtml/Magento/backend/Magento_Backend/layout/default.xml +++ b/app/design/adminhtml/Magento/backend/Magento_Backend/layout/default.xml @@ -7,6 +7,7 @@ --> + From cbb98705b79a30e7dc69a15f0687e3d15cceda0b Mon Sep 17 00:00:00 2001 From: nmalevanec Date: Mon, 30 Jul 2018 17:07:26 +0300 Subject: [PATCH 47/51] ENGCOM-2569: Fix static tests failure. --- lib/internal/Magento/Framework/System/Ftp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/System/Ftp.php b/lib/internal/Magento/Framework/System/Ftp.php index 827e524a62464..73b76931ead2b 100644 --- a/lib/internal/Magento/Framework/System/Ftp.php +++ b/lib/internal/Magento/Framework/System/Ftp.php @@ -109,7 +109,7 @@ public function validateConnectionString($string) } // Decode user & password strings from URL - foreach (array_intersect(array_keys($data), ['user','pass']) as $key) { + foreach (array_intersect(array_keys($data), ['user', 'pass']) as $key) { $data[$key] = urldecode($data[$key]); } From 24f87ccfdbaa60018be708d83729b4c5cf4845b4 Mon Sep 17 00:00:00 2001 From: Volodymyr Zaets Date: Tue, 31 Jul 2018 12:40:29 +0300 Subject: [PATCH 48/51] [Backport] Update template.js #17202 Add suppress warning --- lib/web/mage/utils/template.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/web/mage/utils/template.js b/lib/web/mage/utils/template.js index 5bf9e6a4d8ad5..add59bdb1448e 100644 --- a/lib/web/mage/utils/template.js +++ b/lib/web/mage/utils/template.js @@ -2,6 +2,9 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +/* eslint-disable no-shadow */ + define([ 'jquery', 'underscore', From 2ddec42fe0e89d0a4f85b9a919ffb4d7a5813bdb Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Thu, 2 Aug 2018 19:27:48 +0200 Subject: [PATCH 49/51] fix: remove unused ID --- .../view/frontend/web/template/billing-address/form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/template/billing-address/form.html b/app/code/Magento/Checkout/view/frontend/web/template/billing-address/form.html index 7a750a135cc34..14af0a03de0da 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/billing-address/form.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/billing-address/form.html @@ -9,7 +9,7 @@
-
+
From ebdc7c3770a32cce2944344ecb73def07738b690 Mon Sep 17 00:00:00 2001 From: Steven de Jong Date: Thu, 7 Jun 2018 16:07:17 +0200 Subject: [PATCH 50/51] #15308 extraneous margin removed extraneous margin and compensated padding and set both to 0, which creates the same effect --- .../luma/Magento_Catalog/web/css/source/module/_listings.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/module/_listings.less b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/module/_listings.less index 84f116c2c9547..8053856ace285 100644 --- a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/module/_listings.less +++ b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/module/_listings.less @@ -156,11 +156,11 @@ .column.main { .product { &-items { - margin-left: -@indent__base; + margin-left: 0; } &-item { - padding-left: @indent__base; + padding-left: 0; } } } From 95b0e2073e493830578763ef16ef9e53e4914607 Mon Sep 17 00:00:00 2001 From: vgelani Date: Wed, 4 Jul 2018 19:06:19 +0530 Subject: [PATCH 51/51] Fixed add to wishlist issue on product price 0 --- app/code/Magento/Catalog/Pricing/Price/RegularPrice.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Pricing/Price/RegularPrice.php b/app/code/Magento/Catalog/Pricing/Price/RegularPrice.php index 609255d852da3..1397ceb6bf71c 100644 --- a/app/code/Magento/Catalog/Pricing/Price/RegularPrice.php +++ b/app/code/Magento/Catalog/Pricing/Price/RegularPrice.php @@ -22,14 +22,14 @@ class RegularPrice extends AbstractPrice implements BasePriceProviderInterface /** * Get price value * - * @return float|bool + * @return float */ public function getValue() { if ($this->value === null) { $price = $this->product->getPrice(); $priceInCurrentCurrency = $this->priceCurrency->convertAndRound($price); - $this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : false; + $this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : 0; } return $this->value; }