From b2ef83b1e4539ce1a0300ffb6f063b2b2e7ddbcd Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Mon, 23 Nov 2020 07:43:18 +0600 Subject: [PATCH] 1.4.5 --- Controller/Response/Catalog.php | 6 +++++- Controller/Response/Inventory.php | 2 +- composer.json | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Controller/Response/Catalog.php b/Controller/Response/Catalog.php index 2c99ec6..bcfc205 100644 --- a/Controller/Response/Catalog.php +++ b/Controller/Response/Catalog.php @@ -26,7 +26,7 @@ class Catalog extends _P { * @return Json */ function execute() {return R::p(function() { - $pc = ju_product_c(); /** @var PC $pc */ + $pc = ju_pc(); /** @var PC $pc */ $pc->addAttributeToSelect('*'); /** * 2019-10-30 @@ -40,6 +40,10 @@ function execute() {return R::p(function() { $pc->addAttributeToFilter('visibility', ['in' => [ V::VISIBILITY_BOTH, V::VISIBILITY_IN_CATALOG, V::VISIBILITY_IN_SEARCH ]]); + # 2020-11-23 + # @todo If the flat mode is enabled, then at this point the collection already misses diabled products, + # because the `catalog_product_flat_` table does not contain disabled products at least in Magento 2.4.0. + # It is wrong because disabled products should be in the feed: https://github.com/justuno-com/m2/issues/19 /** * 2019-11-22 * @uses \Magento\Catalog\Model\ResourceModel\Product\Collection::addMediaGalleryData() loads the collection, diff --git a/Controller/Response/Inventory.php b/Controller/Response/Inventory.php index 927b60c..2048ceb 100644 --- a/Controller/Response/Inventory.php +++ b/Controller/Response/Inventory.php @@ -30,6 +30,6 @@ function(P $p) {return ['ID' => $p->getId(), 'Variants' => cVariants::p($p)];} * 2) @uses \Magento\Catalog\Model\ResourceModel\Product\Collection::setVisibility() * filters out the disabled products. */ - ,ju_product_c()->setVisibility([V::VISIBILITY_BOTH, V::VISIBILITY_IN_CATALOG, V::VISIBILITY_IN_SEARCH]) + ,ju_pc()->setVisibility([V::VISIBILITY_BOTH, V::VISIBILITY_IN_CATALOG, V::VISIBILITY_IN_SEARCH]) ));}, true);} } \ No newline at end of file diff --git a/composer.json b/composer.json index 8686980..61de3ba 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "justuno.com/m2" - ,"version": "1.4.4" + ,"version": "1.4.5" ,"description": "Justuno module for Magento 2" ,"type": "magento2-module" ,"homepage": "https://github.com/justuno-com/m2" @@ -11,7 +11,7 @@ ,"homepage": "https://mage2.pro/users/dmitry_fedyuk" ,"role": "Developer" }] - ,"require": {"justuno.com/core": ">=1.0.1"} + ,"require": {"justuno.com/core": ">=1.0.2"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Justuno\\M2\\": ""}} ,"keywords": ["Magento 2"] } \ No newline at end of file