From acf52ec091d4d7953f6bea5b7fb96592037cb22b Mon Sep 17 00:00:00 2001 From: Chirag Matholiya Date: Mon, 4 Jun 2018 15:53:00 +0530 Subject: [PATCH 01/14] Product placeholder image resize issue #13636 --- app/code/Magento/Wishlist/CustomerData/Wishlist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Wishlist/CustomerData/Wishlist.php b/app/code/Magento/Wishlist/CustomerData/Wishlist.php index ec5ed1fedda95..d908b3be95ce8 100644 --- a/app/code/Magento/Wishlist/CustomerData/Wishlist.php +++ b/app/code/Magento/Wishlist/CustomerData/Wishlist.php @@ -156,7 +156,7 @@ protected function getImageData($product) : 'Magento_Catalog/product/image_with_borders'; try { - $imagesize = $helper->getResizedImageInfo(); + $imagesize = [$helper->getWidth(), $helper->getHeight()]; } catch (NotLoadInfoImageException $exception) { $imagesize = [$helper->getWidth(), $helper->getHeight()]; } From 3c88933ea61102e98470b666ac4ab5e9c3b8b741 Mon Sep 17 00:00:00 2001 From: Chirag Matholiya Date: Tue, 5 Jun 2018 10:22:38 +0530 Subject: [PATCH 02/14] Removed unused class from forms less file. --- lib/web/css/source/lib/_forms.less | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/web/css/source/lib/_forms.less b/lib/web/css/source/lib/_forms.less index 800054e58c3dd..b1c7a49da4a7a 100644 --- a/lib/web/css/source/lib/_forms.less +++ b/lib/web/css/source/lib/_forms.less @@ -465,11 +465,9 @@ .lib-css(margin, @_margin); .lib-css(padding, @_padding); letter-spacing: -.31em; - //word-spacing: -.43em; > * { letter-spacing: normal; - //word-spacing: normal; } > .legend { From c080b159d8d2fa354545912e2bdee68b8f659018 Mon Sep 17 00:00:00 2001 From: Lewis Voncken Date: Wed, 31 Jan 2018 12:56:12 +0000 Subject: [PATCH 03/14] Added row_id to the flat action indexer so the value isn't set to 0 for new products when using index on save --- .../Catalog/Model/Indexer/Product/Flat/Action/Indexer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php index 6ee54b3e4ba30..5216aaf925f88 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php @@ -169,6 +169,7 @@ public function write($storeId, $productId, $valueFieldSuffix = '') if (!empty($updateData)) { $updateData += ['entity_id' => $productId]; + $updateData += ['row_id' => $productId]; $updateFields = []; foreach ($updateData as $key => $value) { $updateFields[$key] = $key; From ac0e159fbb64a5f312310fadf4cceda540b77568 Mon Sep 17 00:00:00 2001 From: Lewis Voncken Date: Sat, 5 May 2018 19:34:28 +0200 Subject: [PATCH 04/14] Moved the indexAll after the product save in the Indexer Product Flat RowTest --- .../Catalog/Model/Indexer/Product/Flat/Action/RowTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php index 20cdf2b16b9e4..be0c533fb9467 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php @@ -61,12 +61,13 @@ public function testProductUpdate() $this->_processor->getIndexer()->isScheduled(), 'Indexer is in scheduled mode when turned to update on save mode' ); - $this->_processor->reindexAll(); $this->_product->load(1); $this->_product->setName('Updated Product'); $this->_product->save(); + $this->_processor->reindexAll(); + $category = $categoryFactory->create()->load(9); $layer = $listProduct->getLayer(); $layer->setCurrentCategory($category); From 24cea8173eb462544ade549c654ff04896b18c3f Mon Sep 17 00:00:00 2001 From: Sergey Mutaf Date: Tue, 24 Apr 2018 23:52:41 +0300 Subject: [PATCH 05/14] fix tets fixture and mark return processor as @api --- .../SalesInventory/Model/Order/ReturnProcessor.php | 2 ++ .../Sales/_files/order_with_shipping_and_invoice.php | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/SalesInventory/Model/Order/ReturnProcessor.php b/app/code/Magento/SalesInventory/Model/Order/ReturnProcessor.php index 9a544ff13009f..20bdcb63f55c3 100644 --- a/app/code/Magento/SalesInventory/Model/Order/ReturnProcessor.php +++ b/app/code/Magento/SalesInventory/Model/Order/ReturnProcessor.php @@ -11,6 +11,8 @@ /** * Class ReturnProcessor + * + * @api */ class ReturnProcessor { diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_with_shipping_and_invoice.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_with_shipping_and_invoice.php index a889235ea1862..4c892904b3c3e 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/order_with_shipping_and_invoice.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_with_shipping_and_invoice.php @@ -3,6 +3,9 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +use Magento\Sales\Model\Order\ShipmentFactory; + require 'order.php'; $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); @@ -36,4 +39,10 @@ $order->setIsInProcess(true); -$transaction->addObject($invoice)->addObject($order)->save(); +$items = []; +foreach ($order->getItems() as $orderItem) { + $items[$orderItem->getId()] = $orderItem->getQtyOrdered(); +} +$shipment = $objectManager->get(ShipmentFactory::class)->create($order, $items); + +$transaction->addObject($invoice)->addObject($shipment)->addObject($order)->save(); From b9c030a2976b01e4bf0c78ddcbed53617593347d Mon Sep 17 00:00:00 2001 From: Chirag Matholiya Date: Wed, 6 Jun 2018 15:08:49 +0530 Subject: [PATCH 06/14] Backport Footer responsive issue. --- .../Magento_Theme/web/css/source/_module.less | 23 +++++++++++++++++++ 1 file changed, 23 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 8532659885187..61f05eafee0b8 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 @@ -352,6 +352,29 @@ // _____________________________________________ .media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) { + html, + body { + height: 100%; // Stretch screen area for sticky footer + } + + header, + main, + footer { + flex-shrink: 0; + } + + .page-wrapper { + .lib-vendor-prefix-display(flex); + .lib-vendor-prefix-flex-direction(column); + align-items: stretch; + -webkit-align-items: stretch; + min-height: 100%; // Stretch content area for sticky footer + .page-main { + flex-grow: 1; + -webkit-flex-grow: 1; + } + } + .customer-name, .customer-welcome + .authorization-link { display: none; From 9f549a3da422aa48a644b8eb772a106618053949 Mon Sep 17 00:00:00 2001 From: Chirag Matholiya Date: Wed, 6 Jun 2018 15:27:59 +0530 Subject: [PATCH 07/14] Backport placeholder image issue. --- app/code/Magento/Wishlist/CustomerData/Wishlist.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Wishlist/CustomerData/Wishlist.php b/app/code/Magento/Wishlist/CustomerData/Wishlist.php index bb852d6402deb..2f9114864d793 100644 --- a/app/code/Magento/Wishlist/CustomerData/Wishlist.php +++ b/app/code/Magento/Wishlist/CustomerData/Wishlist.php @@ -154,12 +154,8 @@ protected function getImageData($product) $template = $helper->getFrame() ? 'Magento_Catalog/product/image' : 'Magento_Catalog/product/image_with_borders'; - - try { - $imagesize = [$helper->getWidth(), $helper->getHeight()]; - } catch (NotLoadInfoImageException $exception) { - $imagesize = [$helper->getWidth(), $helper->getHeight()]; - } + + $imagesize = [$helper->getWidth(), $helper->getHeight()]; $width = $helper->getFrame() ? $helper->getWidth() From 81d8e52b922aacb84ea22834643420eeb5697939 Mon Sep 17 00:00:00 2001 From: Marcel Hauri Date: Mon, 28 May 2018 20:34:17 +0200 Subject: [PATCH 08/14] PHPDoc and type hints --- app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php | 2 +- .../Catalog/Block/Adminhtml/Category/Widget/Chooser.php | 2 +- .../Catalog/Block/Adminhtml/Form/Renderer/Fieldset/Element.php | 2 +- .../Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php | 3 +-- .../Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php | 2 +- app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php | 2 +- app/code/Magento/Catalog/Block/Category/Rss/Link.php | 2 +- app/code/Magento/Catalog/Block/Product/AbstractProduct.php | 2 +- .../Catalog/Block/Product/View/Options/AbstractOptions.php | 2 +- app/code/Magento/Catalog/Block/Rss/Product/Special.php | 2 +- 10 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php index e9f71c8a0d485..e3bfee0b862e0 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php @@ -325,7 +325,7 @@ public function getBreadcrumbsJavascript($path, $javascriptVarName) * * @param Node|array $node * @param int $level - * @return string + * @return array * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) */ diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php index 6aa2f04c9c4e8..5decc60d72c5a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php @@ -144,7 +144,7 @@ function (node, e) { * * @param \Magento\Framework\Data\Tree\Node|array $node * @param int $level - * @return string + * @return array */ protected function _getNodeJson($node, $level = 0) { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Fieldset/Element.php b/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Fieldset/Element.php index 10214fc1d16fd..ad6df27b89334 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Fieldset/Element.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Fieldset/Element.php @@ -21,7 +21,7 @@ class Element extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Eleme /** * Retrieve data object related with form * - * @return \Magento\Catalog\Model\Product || \Magento\Catalog\Model\Category + * @return \Magento\Catalog\Model\Product|\Magento\Catalog\Model\Category */ public function getDataObject() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php index ab5026b1e69b9..66e04ef03f771 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php @@ -101,8 +101,7 @@ protected function _prepareColumns() 'type' => 'options', 'options' => ['1' => __('Yes'), '0' => __('No')], 'align' => 'center' - ], - 'is_user_defined' + ] ); $this->_eventManager->dispatch('product_attribute_grid_build', ['grid' => $this]); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php index d5f66231f1d82..e1b97f996c769 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php @@ -81,7 +81,7 @@ public function getSelectorOptions() * * @param string $labelPart * @param int $templateId - * @return \Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection + * @return array */ public function getSuggestedAttributes($labelPart, $templateId = null) { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php b/app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php index dbeff93683bc0..9d13d89d54b80 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php @@ -69,7 +69,7 @@ public function isRssAllowed() } /** - * @return string + * @return array */ protected function getLinkParams() { diff --git a/app/code/Magento/Catalog/Block/Category/Rss/Link.php b/app/code/Magento/Catalog/Block/Category/Rss/Link.php index bcb48b9cfa0b6..02728f467e805 100644 --- a/app/code/Magento/Catalog/Block/Category/Rss/Link.php +++ b/app/code/Magento/Catalog/Block/Category/Rss/Link.php @@ -60,7 +60,7 @@ public function getLabel() } /** - * @return string + * @return array */ protected function getLinkParams() { diff --git a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php index 8060afbec701f..78430e901966d 100644 --- a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php +++ b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php @@ -186,7 +186,7 @@ public function getAddToCompareUrl() * Gets minimal sales quantity * * @param \Magento\Catalog\Model\Product $product - * @return int|null + * @return float|null */ public function getMinimalQty($product) { diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php index 53d2985c65e22..1f2b596a8ae67 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php @@ -174,7 +174,7 @@ public function getPrice($price, $includingTax = null) * Returns price converted to current currency rate * * @param float $price - * @return float + * @return float|string */ public function getCurrencyPrice($price) { diff --git a/app/code/Magento/Catalog/Block/Rss/Product/Special.php b/app/code/Magento/Catalog/Block/Rss/Product/Special.php index c61bee4417cbc..a9107f14cc5e4 100644 --- a/app/code/Magento/Catalog/Block/Rss/Product/Special.php +++ b/app/code/Magento/Catalog/Block/Rss/Product/Special.php @@ -107,7 +107,7 @@ protected function _construct() } /** - * @return string + * @return array */ public function getRssData() { From fa35876ab5d76368f8d0ebbcf1d1a15cada02133 Mon Sep 17 00:00:00 2001 From: Ankur Raiyani Date: Fri, 1 Jun 2018 17:11:28 +0530 Subject: [PATCH 09/14] Wrong Last orders amount on dashboard #15660 Wrong order amount on dashboard on Last orders listing when having more than one website with different currencies #15660 --- .../Backend/Block/Widget/Grid/Column/Renderer/Currency.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php index a9db629f24a87..82c30af830728 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php @@ -70,10 +70,7 @@ public function __construct( $this->_storeManager = $storeManager; $this->_currencyLocator = $currencyLocator; $this->_localeCurrency = $localeCurrency; - $defaultBaseCurrencyCode = $this->_scopeConfig->getValue( - \Magento\Directory\Model\Currency::XML_PATH_CURRENCY_BASE, - 'default' - ); + $defaultBaseCurrencyCode = $currencyLocator->getDefaultCurrency($this->_request); $this->_defaultBaseCurrency = $currencyFactory->create()->load($defaultBaseCurrencyCode); } From f34c9786f28cf18686579de77ebb5b7363f87680 Mon Sep 17 00:00:00 2001 From: Valerij Ivashchenko Date: Mon, 11 Jun 2018 15:47:43 +0300 Subject: [PATCH 10/14] small refactoring to better code readability --- .../Block/Widget/Form/Element/Dependence.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php index ab45d25451850..3d9575dfaa8a0 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php @@ -120,14 +120,17 @@ protected function _toHtml() if (!$this->_depends) { return ''; } - return ''; + + $dependsJson = $this->_getDependsJson(); + $configOptions = $this->_configOptions ? $this->_jsonEncoder->encode($this->_configOptions) : null; + $configOptionsStr = $configOptions ? ', ' . $configOptions : ''; + $paramsStr = $dependsJson . $configOptionsStr; + + return ""; } /** From 324ee503d0fa0ec042e220c92384143efbf110d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karla=20Saarem=C3=A4e?= Date: Mon, 11 Jun 2018 16:04:54 +0300 Subject: [PATCH 11/14] added new variables --- lib/web/css/source/lib/variables/_buttons.less | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/web/css/source/lib/variables/_buttons.less b/lib/web/css/source/lib/variables/_buttons.less index 82f618faa1d0f..8c31c16143859 100644 --- a/lib/web/css/source/lib/variables/_buttons.less +++ b/lib/web/css/source/lib/variables/_buttons.less @@ -47,6 +47,9 @@ @button__active__gradient-color-end: false; // Primary button +@button-primary__font-family: @button__font-family; +@button-primary__font-size: @button__font-size; +@button-primary__font-weight: @button__font-weight; @button-primary__line-height: false; @button-primary__width: false; @button-primary__margin: false; From 41b4775b2d953cba7b7065a1c0d6ec3a088099c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karla=20Saarem=C3=A4e?= Date: Mon, 11 Jun 2018 16:06:50 +0300 Subject: [PATCH 12/14] added new primary button variables --- lib/web/css/source/lib/_buttons.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/web/css/source/lib/_buttons.less b/lib/web/css/source/lib/_buttons.less index 804302fcb69ac..a3e50a0fd24bc 100644 --- a/lib/web/css/source/lib/_buttons.less +++ b/lib/web/css/source/lib/_buttons.less @@ -277,6 +277,9 @@ // --------------------------------------------- .lib-button-primary( + @_button-font-family: @button-primary__font-family, + @_button-font-size: @button-primary__font-size, + @_button-font-weight: @button-primary__font-weight, @_button-line-height: @button-primary__line-height, @_button-width: @button-primary__width, @_button-margin: @button-primary__margin, @@ -300,6 +303,9 @@ @_button-gradient-direction: @button-primary__gradient-direction ) { .lib-button( + @_button-font-family: @_button-font-family, + @_button-font-size: @_button-font-size, + @_button-font-weight: @_button-font-weight, @_button-line-height: @_button-line-height, @_button-width: @_button-width, @_button-margin: @_button-margin, From c87e8af14cb9e38aa5ce8cb0ac5a08dc288f5420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karla=20Saarem=C3=A4e?= Date: Mon, 11 Jun 2018 11:41:48 +0300 Subject: [PATCH 13/14] checkout page cart icon color fix --- .../web/css/source/module/checkout/_estimated-total.less | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_estimated-total.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_estimated-total.less index 86df8d870552b..85c65bd0ff2d7 100644 --- a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_estimated-total.less +++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_estimated-total.less @@ -35,7 +35,11 @@ .action { &.showcart { &:before { - .lib-css(color, @primary__color); + .lib-css(color, @button__color); + } + + &:hover:before { + .lib-css(color, @button__hover__color); } } } From 7c3ce72a9bd3e365b58670555d48c5e7dba25c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karla=20Saarem=C3=A4e?= Date: Mon, 11 Jun 2018 09:52:20 +0300 Subject: [PATCH 14/14] fix for dropdown toggle icon --- app/design/frontend/Magento/blank/web/css/source/_extends.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/design/frontend/Magento/blank/web/css/source/_extends.less b/app/design/frontend/Magento/blank/web/css/source/_extends.less index 58adadf8f1a82..076162fbf5f45 100644 --- a/app/design/frontend/Magento/blank/web/css/source/_extends.less +++ b/app/design/frontend/Magento/blank/web/css/source/_extends.less @@ -1401,7 +1401,7 @@ &.active { > .title { .lib-icon-font-symbol( - @_icon-font-content: @icon-prev, + @_icon-font-content: @icon-up, @_icon-font-position: after ); }