Skip to content

Commit 7db91af

Browse files
author
Magento CICD
authored
merge magento/2.3-develop into magento-qwerty/MAGETWO-89899
2 parents dc5170d + 08a72a5 commit 7db91af

File tree

6 files changed

+172
-128
lines changed

6 files changed

+172
-128
lines changed

app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/RateQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function getBindings()
9999
}
100100
} else {
101101
$bind[':condition_name'] = $this->request->getConditionName();
102-
$bind[':condition_value'] = $this->request->getData($this->request->getConditionName());
102+
$bind[':condition_value'] = round($this->request->getData($this->request->getConditionName()), 4);
103103
}
104104

105105
return $bind;

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

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator;
99
use Magento\Store\Model\Store;
1010
use Magento\Framework\App\ObjectManager;
11+
use Magento\Store\Model\ScopeInterface;
12+
use Magento\Catalog\Helper\Product as HelperProduct;
1113

1214
/**
1315
* Sitemap resource product collection model
@@ -88,6 +90,13 @@ class Product extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
8890
* @var \Magento\Catalog\Helper\Image
8991
*/
9092
private $catalogImageHelper;
93+
94+
/**
95+
* Scope Config
96+
*
97+
* @var \Magento\Framework\App\Config\ScopeConfigInterface
98+
*/
99+
private $scopeConfig;
91100

92101
/**
93102
* @param \Magento\Framework\Model\ResourceModel\Db\Context $context
@@ -102,6 +111,7 @@ class Product extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
102111
* @param string $connectionName
103112
* @param \Magento\Catalog\Model\Product $productModel
104113
* @param \Magento\Catalog\Helper\Image $catalogImageHelper
114+
* @param \Magento\Framework\App\Config\ScopeConfigInterface|null $scopeConfig
105115
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
106116
*/
107117
public function __construct(
@@ -116,7 +126,8 @@ public function __construct(
116126
\Magento\Catalog\Model\Product\Media\Config $mediaConfig,
117127
$connectionName = null,
118128
\Magento\Catalog\Model\Product $productModel = null,
119-
\Magento\Catalog\Helper\Image $catalogImageHelper = null
129+
\Magento\Catalog\Helper\Image $catalogImageHelper = null,
130+
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig = null
120131
) {
121132
$this->_productResource = $productResource;
122133
$this->_storeManager = $storeManager;
@@ -129,6 +140,8 @@ public function __construct(
129140
$this->productModel = $productModel ?: ObjectManager::getInstance()->get(\Magento\Catalog\Model\Product::class);
130141
$this->catalogImageHelper = $catalogImageHelper ?: ObjectManager::getInstance()
131142
->get(\Magento\Catalog\Helper\Image::class);
143+
$this->scopeConfig = $scopeConfig ?: ObjectManager::getInstance()
144+
->get(\Magento\Framework\App\Config\ScopeConfigInterface::class);
132145
parent::__construct($context, $connectionName);
133146
}
134147

@@ -272,6 +285,10 @@ public function getCollection($storeId)
272285
}
273286

274287
$connection = $this->getConnection();
288+
$urlsConfigCondition = '';
289+
if ($this->isCategoryProductURLsConfig($storeId)) {
290+
$urlsConfigCondition = 'NOT ';
291+
}
275292

276293
$this->_select = $connection->select()->from(
277294
['e' => $this->getMainTable()],
@@ -282,7 +299,8 @@ public function getCollection($storeId)
282299
[]
283300
)->joinLeft(
284301
['url_rewrite' => $this->getTable('url_rewrite')],
285-
'e.entity_id = url_rewrite.entity_id AND url_rewrite.is_autogenerated = 1 AND url_rewrite.metadata IS NULL'
302+
'e.entity_id = url_rewrite.entity_id AND url_rewrite.is_autogenerated = 1 AND url_rewrite.metadata IS '
303+
. $urlsConfigCondition . 'NULL'
286304
. $connection->quoteInto(' AND url_rewrite.store_id = ?', $store->getId())
287305
. $connection->quoteInto(' AND url_rewrite.entity_type = ?', ProductUrlRewriteGenerator::ENTITY_TYPE),
288306
['url' => 'request_path']
@@ -449,4 +467,20 @@ private function getProductImageUrl($image)
449467

450468
return $imgUrl;
451469
}
470+
471+
/**
472+
* Return Use Categories Path for Product URLs config value
473+
*
474+
* @param $storeId
475+
*
476+
* @return bool
477+
*/
478+
private function isCategoryProductURLsConfig($storeId)
479+
{
480+
return (bool)$this->scopeConfig->getValue(
481+
HelperProduct::XML_PATH_PRODUCT_URL_USE_CATEGORY,
482+
ScopeInterface::SCOPE_STORE,
483+
$storeId
484+
);
485+
}
452486
}

app/code/Magento/Ui/Component/Layout/Tabs.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,15 +350,21 @@ protected function initAreas()
350350
protected function addNavigationBlock()
351351
{
352352
$pageLayout = $this->component->getContext()->getPageLayout();
353+
354+
$navName = 'tabs_nav';
355+
if ($pageLayout->hasElement($navName)) {
356+
$navName = $this->component->getName() . '_tabs_nav';
357+
}
358+
353359
/** @var \Magento\Ui\Component\Layout\Tabs\Nav $navBlock */
354360
if (isset($this->navContainerName)) {
355361
$navBlock = $pageLayout->addBlock(
356362
\Magento\Ui\Component\Layout\Tabs\Nav::class,
357-
'tabs_nav',
363+
$navName,
358364
$this->navContainerName
359365
);
360366
} else {
361-
$navBlock = $pageLayout->addBlock(\Magento\Ui\Component\Layout\Tabs\Nav::class, 'tabs_nav', 'content');
367+
$navBlock = $pageLayout->addBlock(\Magento\Ui\Component\Layout\Tabs\Nav::class, $navName, 'content');
362368
}
363369
$navBlock->setTemplate('Magento_Ui::layout/tabs/nav/default.phtml');
364370
$navBlock->setData('data_scope', $this->namespace);

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"ext-spl": "*",
2828
"ext-xsl": "*",
2929
"ext-zip": "*",
30+
"ext-bcmath": "*",
3031
"lib-libxml": "*",
3132
"braintree/braintree_php": "3.28.0",
3233
"colinmollenhour/cache-backend-file": "~1.4.1",

0 commit comments

Comments
 (0)