diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index c2e9fa9cef24..ba46c6e72cf5 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -1,4 +1,4 @@ -# Magento Code of Conduct +# Mage-OS Code of Conduct ## Our Pledge diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 2b1720ccaaba..bfa885e59552 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,5 +1,5 @@ 1. 2. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index d4e0707f7ede..71e60ce0f473 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,5 +1,5 @@ name: Bug report -description: Technical issue with the Magento 2 core components +description: Technical issue with the Mage-OS Magento 2 core components body: - type: markdown attributes: @@ -12,7 +12,7 @@ body: Describe your environment. Provide all the details that will help us to reproduce the bug. value: | - - Magento version + - Mage-OS Magento version - Anything else that would help a developer reproduce the bug - type: textarea attributes: @@ -51,7 +51,7 @@ body: attributes: label: Additional information description: | - Additional information is often requested when the bug report is processed. You can save time by providing both Magento and browser logs, screenshots, repository branch and HEAD commit you checked out to install Magento and any other artifacts related to the issue. + Additional information is often requested when the bug report is processed. You can save time by providing both Mage-OS Magento and browser logs, screenshots, repository branch and HEAD commit you checked out to install Magento and any other artifacts related to the issue. Also, links to the comments with important information, Root Cause analysis, additional video recordings; and anything else that is important for the issue and at some reason cannot be added to other sections. - type: textarea attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index b6b7491ada86..3c0a463e44d8 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -5,7 +5,7 @@ body: - type: markdown attributes: value: | - Important: This repository is intended only for Magento 2 Technical Issues. + Important: This repository is intended only for Mage-OS Magento 2 Technical Issues. Enter Feature Requests at https://github.com/magento/community-features. Project stakeholders monitor and manage requests. Feature requests entered using this form may be moved to the forum. @@ -28,7 +28,7 @@ body: attributes: label: Benefits description: | - How do you think this feature would improve Magento? + How do you think this feature would improve Mage-OS Magento? - type: textarea attributes: label: Additional information diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fd2f7f1badc2..5dc88d3d9b01 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,5 @@ -1. Fixes magento/magento2# +1. Fixes mage-os/mageos-magento2# ### Manual testing scenarios (*) + Magento\AdminAnalytics\ViewModel\Metadata diff --git a/app/code/Magento/Backend/Model/Menu.php b/app/code/Magento/Backend/Model/Menu.php index 9506ac3dc36c..faa5f0cf8335 100644 --- a/app/code/Magento/Backend/Model/Menu.php +++ b/app/code/Magento/Backend/Model/Menu.php @@ -86,7 +86,7 @@ public function add(Item $item, $parentId = null, $index = null) $index = (int) $index; if (!isset($this[$index])) { $this->offsetSet($index, $item); - $this->_logger->info( + $this->_logger->debug( sprintf('Add of item with id %s was processed', $item->getId()) ); } else { @@ -151,7 +151,7 @@ public function remove($itemId) if ($item->getId() == $itemId) { unset($this[$key]); $result = true; - $this->_logger->info( + $this->_logger->debug( sprintf('Remove on item with id %s was processed', $item->getId()) ); break; diff --git a/app/code/Magento/Backend/Model/Menu/Director/Director.php b/app/code/Magento/Backend/Model/Menu/Director/Director.php index 7821a4dbae00..bb70eb331755 100644 --- a/app/code/Magento/Backend/Model/Menu/Director/Director.php +++ b/app/code/Magento/Backend/Model/Menu/Director/Director.php @@ -30,7 +30,7 @@ protected function _getCommand($data, $logger) { $command = $this->_commandFactory->create($data['type'], ['data' => $data]); if (isset($this->_messagePatterns[$data['type']])) { - $logger->info( + $logger->debug( sprintf($this->_messagePatterns[$data['type']], $command->getId()) ); } diff --git a/app/code/Magento/Backend/i18n/en_US.csv b/app/code/Magento/Backend/i18n/en_US.csv index b72db96d6a59..64ce31433b19 100644 --- a/app/code/Magento/Backend/i18n/en_US.csv +++ b/app/code/Magento/Backend/i18n/en_US.csv @@ -240,7 +240,10 @@ password,password "Reload Data","Reload Data" "Browse Files...","Browse Files..." Magento,Magento +"Mage-OS","Mage-OS" "Copyright © %1 Magento Commerce Inc. All rights reserved.","Copyright © %1 Magento Commerce Inc. All rights reserved." +"Thank you for choosing Mage-OS.","Thank you for choosing Mage-OS." +"Learn more about Mage-OS.","Learn more about Mage-OS." "ver. %1","ver. %1" "Magento Admin Panel","Magento Admin Panel" "Account Setting","Account Setting" diff --git a/app/code/Magento/Backend/view/adminhtml/layout/admin_login.xml b/app/code/Magento/Backend/view/adminhtml/layout/admin_login.xml index 9ddcb0f3b3bb..85e184df0d49 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/admin_login.xml +++ b/app/code/Magento/Backend/view/adminhtml/layout/admin_login.xml @@ -24,7 +24,7 @@ - images/magento-logo.svg + images/mage-os-logo.svg diff --git a/app/code/Magento/Backend/view/adminhtml/layout/default.xml b/app/code/Magento/Backend/view/adminhtml/layout/default.xml index 1c28d5fc5935..8feb4d5163cb 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/default.xml +++ b/app/code/Magento/Backend/view/adminhtml/layout/default.xml @@ -26,7 +26,7 @@ logo Community Edition - images/magento-icon.svg + images/mage-os-icon.svg @@ -63,12 +63,12 @@ - https://www.adobe.com/privacy/policy.html + https://mage-os.org/privacy-policy - https://github.com/magento/magento2/issues + https://github.com/mage-os/mageos-magento2/issues diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml index e3a5c84ea452..293fe82b7f09 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml @@ -3,6 +3,17 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +use Magento\Backend\Block\Page\Copyright; +use Magento\Framework\Escaper; + +/** @var Escaper $escaper */ +/** @var Copyright $block */ ?> - -escapeHtml(__('Copyright © %1 Magento Commerce Inc. All rights reserved.', date('Y'))) ?> +escapeHtml(__('Thank you for choosing Mage-OS.')); ?> + + escapeHtml(__('Learn more about Mage-OS.')); ?> + diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml index 3f21dcda9a54..7b1f14d28a50 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml @@ -3,8 +3,14 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +use Magento\Backend\Block\Page\Footer; +use Magento\Framework\Escaper; + +/** @var Escaper $escaper */ +/** @var Footer $block */ ?>

- escapeHtml(__('Magento')) ?> - escapeHtml(__('ver. %1', $block->getMagentoVersion())) ?> + escapeHtml(__('Mage-OS')); ?> + escapeHtml(__('ver. %1', $block->getMagentoVersion())); ?>

diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml index 89f144664003..f5d9172a51c4 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml @@ -3,62 +3,74 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -/** @var $block \Magento\Backend\Block\Page\Header */ +use Magento\Backend\Block\Page\Header; +use Magento\Framework\Escaper; + +/** @var Escaper $escaper */ +/** @var Header $block */ $part = $block->getShowPart(); ?> - - hasEdition() ? 'data-edition="' . $block->escapeHtml($block->getEdition()) . '"' : ''; ?> - hasLogoImageSrc()) ? $block->escapeHtml($block->getLogoImageSrc()) : 'images/magento-logo.svg' ?> - - class="logo"> - <?= $block->escapeHtml(__('Magento Admin Panel')) ?> - - - + + getChildHtml(); ?> diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php index 4119335d37b4..4e6956a786e8 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php @@ -187,7 +187,7 @@ abstract public function execute(); */ protected function reindex() { - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { if ($this->getPathFromCategoryId($store->getRootCategoryId())) { $this->setCurrentStore($store); $this->reindexRootCategory($store); @@ -286,7 +286,7 @@ protected function getPathFromCategoryId($categoryId) ['path'] )->where( 'entity_id = ?', - $categoryId + $categoryId == 0 ? 1 : $categoryId ) ); } @@ -323,10 +323,6 @@ protected function getNonAnchorCategoriesSelect(Store $store) ['ccp' => $this->getTable('catalog_category_product')], 'ccp.category_id = cc.entity_id', [] - )->joinInner( - ['cpw' => $this->getTable('catalog_product_website')], - 'cpw.product_id = ccp.product_id', - [] )->joinInner( ['cpe' => $this->getTable('catalog_product_entity')], 'ccp.product_id = cpe.entity_id', @@ -355,11 +351,6 @@ protected function getNonAnchorCategoriesSelect(Store $store) ' AND cpvs.store_id = ' . $store->getId(), [] - )->where( - 'cc.path LIKE ' . $this->connection->quote($rootPath . '/%') - )->where( - 'cpw.website_id = ?', - $store->getWebsiteId() )->where( $this->connection->getIfNullSql('cpss.value', 'cpsd.value') . ' = ?', \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED @@ -383,6 +374,19 @@ protected function getNonAnchorCategoriesSelect(Store $store) ] ); + if ($store->getId() != 0) { + $select->joinInner( + ['cpw' => $this->getTable('catalog_product_website')], + 'cpw.product_id = ccp.product_id', + [] + )->where( + 'cpw.website_id = ?', + $store->getWebsiteId() + )->where( + 'cc.path LIKE ' . $this->connection->quote($rootPath . '/%') + ); + } + $this->addFilteringByChildProductsToSelect($select, $store); $this->nonAnchorSelects[$store->getId()] = $select; @@ -533,6 +537,7 @@ protected function createAnchorSelect(Store $store) $visibilityAttributeId = $this->config->getAttribute(Product::ENTITY, 'visibility')->getId(); $rootCatIds = explode('/', $this->getPathFromCategoryId($store->getRootCategoryId())); array_pop($rootCatIds); + $rootCatIds = $rootCatIds ?: [1]; $temporaryTreeTable = $this->makeTempCategoryTreeIndex(); @@ -564,10 +569,6 @@ protected function createAnchorSelect(Store $store) ['cpe' => $this->getTable('catalog_product_entity')], 'ccp.product_id = cpe.entity_id', [] - )->joinInner( - ['cpw' => $this->getTable('catalog_product_website')], - 'cpw.product_id = ccp.product_id', - [] )->joinInner( ['cpsd' => $this->getTable('catalog_product_entity_int')], 'cpsd.' . $productLinkField . ' = cpe.' . $productLinkField . ' AND cpsd.store_id = 0' @@ -602,9 +603,6 @@ protected function createAnchorSelect(Store $store) . ' AND ccas.attribute_id = ccad.attribute_id AND ccas.store_id = ' . $store->getId(), [] - )->where( - 'cpw.website_id = ?', - $store->getWebsiteId() )->where( $this->connection->getIfNullSql('cpss.value', 'cpsd.value') . ' = ?', \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED @@ -631,6 +629,17 @@ protected function createAnchorSelect(Store $store) ] ); + if ($store->getId() != 0) { + $select->joinInner( + ['cpw' => $this->getTable('catalog_product_website')], + 'cpw.product_id = ccp.product_id', + [] + )->where( + 'cpw.website_id = ?', + $store->getWebsiteId() + ); + } + $this->addFilteringByChildProductsToSelect($select, $store); return $select; @@ -818,10 +827,6 @@ protected function getAllProducts(Store $store) $select = $this->connection->select()->from( ['cp' => $this->getTable('catalog_product_entity')], [] - )->joinInner( - ['cpw' => $this->getTable('catalog_product_website')], - 'cpw.product_id = cp.entity_id', - [] )->joinInner( ['cpsd' => $this->getTable('catalog_product_entity_int')], 'cpsd.' . $linkField . ' = cp.' . $linkField . ' AND cpsd.store_id = 0' . @@ -850,9 +855,6 @@ protected function getAllProducts(Store $store) ['ccp' => $this->getTable('catalog_category_product')], 'ccp.product_id = cp.entity_id', [] - )->where( - 'cpw.website_id = ?', - $store->getWebsiteId() )->where( $this->connection->getIfNullSql('cpss.value', 'cpsd.value') . ' = ?', \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED @@ -882,6 +884,17 @@ protected function getAllProducts(Store $store) ] ); + if ($store->getId() != 0) { + $select->joinInner( + ['cpw' => $this->getTable('catalog_product_website')], + 'cpw.product_id = ccp.product_id', + [] + )->where( + 'cpw.website_id = ?', + $store->getWebsiteId() + ); + } + $this->productsSelects[$store->getId()] = $select; } diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php index e94c7a4ee0cf..c6ca0775b7e3 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php @@ -133,7 +133,7 @@ public function __construct( */ private function createTables(): void { - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { $this->tableMaintainer->createTablesForStore((int)$store->getId()); } } @@ -145,7 +145,7 @@ private function createTables(): void */ private function clearReplicaTables(): void { - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { $this->connection->truncateTable($this->tableMaintainer->getMainReplicaTable((int)$store->getId())); } } @@ -158,7 +158,7 @@ private function clearReplicaTables(): void private function switchTables(): void { $tablesToSwitch = []; - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { $tablesToSwitch[] = $this->tableMaintainer->getMainTable((int)$store->getId()); } $this->activeTableSwitcher->switchTable($this->connection, $tablesToSwitch); @@ -188,7 +188,7 @@ protected function reindex(): void { $userFunctions = []; - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { if ($this->getPathFromCategoryId($store->getRootCategoryId())) { $userFunctions[$store->getId()] = function () use ($store) { $this->reindexStore($store); diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Rows.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Rows.php index c53277a58157..70c5c14bb19e 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Rows.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Rows.php @@ -117,7 +117,7 @@ public function execute(array $entityIds = [], $useTempTable = false) || ($indexer->isScheduled() && !$useTempTable) || ($indexer->isScheduled() && $useTempTable && !$workingState)) { if ($useTempTable && !$workingState && $indexer->isScheduled()) { - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { $this->connection->truncateTable($this->getIndexTable($store->getId())); } } else { @@ -130,7 +130,7 @@ public function execute(array $entityIds = [], $useTempTable = false) $workingState = $this->isWorkingState(); if ($useTempTable && !$workingState && $indexer->isScheduled()) { - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { $removalCategoryIds = array_diff($this->limitationByCategories, [$this->getRootCategoryId($store)]); $this->connection->delete( $this->tableMaintainer->getMainTable($store->getId()), @@ -204,7 +204,7 @@ private function getRootCategoryId($store) */ private function removeEntries() { - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { $removalCategoryIds = array_diff($this->limitationByCategories, [$this->getRootCategoryId($store)]); $this->connection->delete( $this->getIndexTable($store->getId()), diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php index 12a9d85dc416..05eb9dfae3c1 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php @@ -78,7 +78,7 @@ protected function validate(AbstractModel $group) */ public function afterDelete(AbstractDb $subject, AbstractDb $objectResource, AbstractModel $storeGroup) { - foreach ($storeGroup->getStores() as $store) { + foreach ($storeGroup->getStores(true) as $store) { $this->tableMaintainer->dropTablesForStore((int)$store->getId()); } return $objectResource; diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php b/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php index ab04f7c56c3d..53aa1eb08716 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php @@ -115,7 +115,7 @@ public function execute(array $entityIds = [], $useTempTable = false) $affectedCategories = $this->getCategoryIdsFromIndex($idsToBeReIndexed); if ($useTempTable && !$workingState && $indexer->isScheduled()) { - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { $this->connection->truncateTable($this->getIndexTable($store->getId())); } } else { @@ -127,7 +127,7 @@ public function execute(array $entityIds = [], $useTempTable = false) $workingState = $this->isWorkingState(); if ($useTempTable && !$workingState && $indexer->isScheduled()) { - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { $this->connection->delete( $this->tableMaintainer->getMainTable($store->getId()), ['product_id IN (?)' => $this->limitationByProducts] @@ -236,7 +236,7 @@ private function registerCategories(array $categoryIds) */ protected function removeEntries() { - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { $this->connection->delete( $this->getIndexTable($store->getId()), ['product_id IN (?)' => $this->limitationByProducts] @@ -299,7 +299,7 @@ protected function isRangingNeeded() private function getCategoryIdsFromIndex(array $productIds): array { $categoryIds = []; - foreach ($this->storeManager->getStores() as $store) { + foreach ($this->storeManager->getStores(true) as $store) { $storeCategories = $this->connection->fetchCol( $this->connection->select() ->from($this->getIndexTable($store->getId()), ['category_id']) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index 259399ece827..a998d97eb6c7 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -11,6 +11,7 @@ use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\DB\Select; use Magento\Store\Model\ScopeInterface; +use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer; /** * Category resource collection @@ -75,6 +76,11 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Collection\Abstrac */ private $catalogProductVisibility; + /** + * @var TableMaintainer + */ + private $tableMaintainer; + /** * Constructor * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory @@ -124,6 +130,7 @@ public function __construct( \Magento\Framework\App\ObjectManager::getInstance()->get(ScopeConfigInterface::class); $this->catalogProductVisibility = $catalogProductVisibility ?: \Magento\Framework\App\ObjectManager::getInstance()->get(Visibility::class); + $this->tableMaintainer = \Magento\Framework\App\ObjectManager::getInstance()->get(TableMaintainer::class); } /** @@ -340,7 +347,7 @@ public function loadProductCount($items, $countRegular = true, $countAnchor = tr foreach ($anchor as $item) { $productsCount = isset($categoryProductsCount[$item->getId()]) ? (int)$categoryProductsCount[$item->getId()] - : $this->getProductsCountFromCategoryTable($item, $websiteId); + : 0; $item->setProductCount($productsCount); } } @@ -519,45 +526,6 @@ public function getProductTable() return $this->_productTable; } - /** - * Get products count using catalog_category_entity table - * - * @param Category $item - * @param string $websiteId - * @return int - */ - private function getProductsCountFromCategoryTable(Category $item, string $websiteId): int - { - $productCount = 0; - - if ($item->getAllChildren()) { - $bind = ['entity_id' => $item->getId(), 'c_path' => $item->getPath() . '/%']; - $select = $this->_conn->select(); - $select->from( - ['main_table' => $this->getProductTable()], - new \Zend_Db_Expr('COUNT(DISTINCT main_table.product_id)') - )->joinInner( - ['e' => $this->getTable('catalog_category_entity')], - 'main_table.category_id=e.entity_id', - [] - )->where( - '(e.entity_id = :entity_id OR e.path LIKE :c_path)' - ); - if ($websiteId) { - $select->join( - ['w' => $this->getProductWebsiteTable()], - 'main_table.product_id = w.product_id', - [] - )->where( - 'w.website_id = ?', - $websiteId - ); - } - $productCount = (int)$this->_conn->fetchOne($select, $bind); - } - return $productCount; - } - /** * Get query for retrieve count of products per category * @@ -567,7 +535,7 @@ private function getProductsCountFromCategoryTable(Category $item, string $websi */ private function getProductsCountQuery(array $categoryIds, $addVisibilityFilter = true): Select { - $categoryTable = $this->_resource->getTableName('catalog_category_product_index'); + $categoryTable = $this->tableMaintainer->getMainTable($this->getProductStoreId()); $select = $this->_conn->select() ->from( ['cat_index' => $categoryTable], diff --git a/app/code/Magento/Catalog/Setup/Patch/Schema/EnableSegmentation.php b/app/code/Magento/Catalog/Setup/Patch/Schema/EnableSegmentation.php index 8ae84f9f8e32..442ae036a222 100644 --- a/app/code/Magento/Catalog/Setup/Patch/Schema/EnableSegmentation.php +++ b/app/code/Magento/Catalog/Setup/Patch/Schema/EnableSegmentation.php @@ -40,7 +40,7 @@ public function apply() $this->schemaSetup->startSetup(); $setup = $this->schemaSetup; - $storeSelect = $setup->getConnection()->select()->from($setup->getTable('store'))->where('store_id > 0'); + $storeSelect = $setup->getConnection()->select()->from($setup->getTable('store')); foreach ($setup->getConnection()->fetchAll($storeSelect) as $store) { $indexTable = $setup->getTable('catalog_category_product_index') . '_' . @@ -54,7 +54,7 @@ public function apply() ) ); } - if (!$setup->getConnection()->isTableExists($indexTable . '_replica')) { + if ($store['store_id'] > 0 && !$setup->getConnection()->isTableExists($indexTable . '_replica')) { $setup->getConnection()->createTable( $setup->getConnection()->createTableByDdl( $setup->getTable('catalog_category_product_index'), diff --git a/app/code/Magento/Email/view/frontend/web/logo_email.png b/app/code/Magento/Email/view/frontend/web/logo_email.png index 215e9d06edcd..ac822941c785 100644 Binary files a/app/code/Magento/Email/view/frontend/web/logo_email.png and b/app/code/Magento/Email/view/frontend/web/logo_email.png differ diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/templates/html/notices.phtml b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/templates/html/notices.phtml index b2e0aaf20ce3..94eaf25e935d 100644 --- a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/templates/html/notices.phtml +++ b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/templates/html/notices.phtml @@ -8,7 +8,7 @@ * @var \Magento\Framework\View\Element\Template $block * @var \Magento\Framework\Escaper $escaper */ -$viewFileUrl = $block->getViewFileUrl('Magento_LoginAsCustomerFrontendUi::images/magento-icon.svg'); +$viewFileUrl = $block->getViewFileUrl('Magento_LoginAsCustomerFrontendUi::images/mage-os-icon.svg'); ?> getConfig()->isEnabled()): ?>
getViewFileUrl('Magento_LoginAsCustomerFrontendUi::images