Skip to content

Commit 3f41d74

Browse files
author
Magento CICD
authored
Merge 00efa0d into MTA-4123
2 parents c1c85d6 + 00efa0d commit 3f41d74

File tree

86 files changed

+2230
-314
lines changed

Some content is hidden

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

86 files changed

+2230
-314
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ atlassian*
3232

3333
/pub/media/*.*
3434
!/pub/media/.htaccess
35+
/pub/media/attribute/*
36+
!/pub/media/attribute/.htaccess
3537
/pub/media/analytics/*
3638
/pub/media/catalog/*
3739
!/pub/media/catalog/.htaccess

app/code/Magento/Backend/Block/Menu.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*
1414
* @method \Magento\Backend\Block\Menu setAdditionalCacheKeyInfo(array $cacheKeyInfo)
1515
* @method array getAdditionalCacheKeyInfo()
16+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1617
*/
1718
class Menu extends \Magento\Backend\Block\Template
1819
{
@@ -381,7 +382,7 @@ public function renderNavigation($menu, $level = 0, $limit = 0, $colBrakes = [])
381382
$itemName = substr($menuId, strrpos($menuId, '::') + 2);
382383
$itemClass = str_replace('_', '-', strtolower($itemName));
383384

384-
if (count($colBrakes) && $colBrakes[$itemPosition]['colbrake']) {
385+
if (count($colBrakes) && $colBrakes[$itemPosition]['colbrake'] && $itemPosition != 1) {
385386
$output .= '</ul></li><li class="column"><ul role="menu">';
386387
}
387388

app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\Braintree\Gateway\Response;
77

8-
use \Braintree\Transaction;
98
use Magento\Braintree\Gateway\Config\Config;
109
use Magento\Payment\Gateway\Helper\ContextHelper;
1110
use Magento\Sales\Api\Data\OrderPaymentInterface;

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Magento\Bundle\Model\Product\Attribute\Source\Shipment\Type as ShipmentType;
1212
use Magento\Framework\Stdlib\ArrayManager;
1313
use Magento\Ui\Component\Container;
14-
use Magento\Ui\Component\DynamicRows;
1514
use Magento\Ui\Component\Form;
1615
use Magento\Ui\Component\Modal;
1716
use Magento\Catalog\Api\Data\ProductAttributeInterface;

app/code/Magento/Bundle/view/base/templates/product/price/final_price.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<?php
1212
$idSuffix = $block->getIdSuffix() ? $block->getIdSuffix() : '';
1313
/** @var \Magento\Bundle\Pricing\Render\FinalPriceBox $block */
14-
$productId = $block->getSaleableItem()->getId();
14+
15+
1516
/** @var \Magento\Bundle\Pricing\Price\FinalPrice $finalPriceModel */
1617
$finalPriceModel = $block->getPrice();
1718
$minimalPrice = $finalPriceModel->getMinimalPrice();

app/code/Magento/Catalog/Model/Product.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Magento\Framework\Pricing\SaleableInterface;
1515
use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface;
1616
use Magento\Catalog\Model\Product\Attribute\Backend\Media\EntryConverterPool;
17-
use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryExtensionFactory;
1817

1918
/**
2019
* Catalog product model

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ public function delete($object)
10221022
$this->getEntityManager()->delete($object);
10231023
$this->_eventManager->dispatch(
10241024
'catalog_category_delete_after_done',
1025-
['product' => $object]
1025+
['product' => $object, 'category' => $object]
10261026
);
10271027
return $this;
10281028
}

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,7 @@ public function addCategoryFilter(\Magento\Catalog\Model\Category $category)
863863
* Filter Product by Categories
864864
*
865865
* @param array $categoriesFilter
866+
* @return $this
866867
*/
867868
public function addCategoriesFilter(array $categoriesFilter)
868869
{
@@ -876,6 +877,7 @@ public function addCategoriesFilter(array $categoriesFilter)
876877
];
877878
$this->getSelect()->where($this->getConnection()->prepareSqlCondition('e.entity_id' , $selectCondition));
878879
}
880+
return $this;
879881
}
880882

881883
/**

app/code/Magento/Catalog/view/base/web/js/price-box.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ define([
2121

2222
$.widget('mage.priceBox', {
2323
options: globalOptions,
24-
cache: {},
2524

2625
/**
2726
* Widget initialisation.
@@ -39,6 +38,7 @@ define([
3938
* Widget creating.
4039
*/
4140
_create: function createPriceBox() {
41+
this.cache = {};
4242
var box = this.element;
4343

4444
this._setDefaultsFromPriceConfig();

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,6 @@ protected function _saveProductWebsites(array $websiteData)
21162116
*/
21172117
protected function _saveStockItem()
21182118
{
2119-
$indexer = $this->indexerRegistry->get('catalog_product_category');
21202119
/** @var $stockResource \Magento\CatalogInventory\Model\ResourceModel\Stock\Item */
21212120
$stockResource = $this->_stockResItemFac->create();
21222121
$entityTable = $stockResource->getMainTable();
@@ -2172,13 +2171,25 @@ protected function _saveStockItem()
21722171
$this->_connection->insertOnDuplicate($entityTable, array_values($stockData));
21732172
}
21742173

2175-
if ($productIdsToReindex) {
2176-
$indexer->reindexList($productIdsToReindex);
2177-
}
2174+
$this->reindexProducts($productIdsToReindex);
21782175
}
21792176
return $this;
21802177
}
21812178

2179+
/**
2180+
* Initiate product reindex by product ids
2181+
*
2182+
* @param array $productIdsToReindex
2183+
* @return void
2184+
*/
2185+
private function reindexProducts($productIdsToReindex = [])
2186+
{
2187+
$indexer = $this->indexerRegistry->get('catalog_product_category');
2188+
if (is_array($productIdsToReindex) && count($productIdsToReindex) > 0 && !$indexer->isScheduled()) {
2189+
$indexer->reindexList($productIdsToReindex);
2190+
}
2191+
}
2192+
21822193
/**
21832194
* Retrieve attribute by code
21842195
*

0 commit comments

Comments
 (0)