Skip to content

Commit

Permalink
1.4.6: #19
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Nov 23, 2020
1 parent b2ef83b commit 56c8687
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Catalog/Variants.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ static function p(P $p) { /** @var array(array(string => mixed)) $r */
}
else {
$ct = $p->getTypeInstance(); /** @var Configurable $ct */
if (!($children = $ct->getUsedProducts($p))) { /** @var P[] $children */
/** @var P[] $children */
$children = ju_pc_preserve_absent_f(function() use($ct, $p) {return $ct->getUsedProducts($p);});
if (!$children) {
# 2020-11-23
# 1) "A configurable product without any associated child products should not produce variants":
# https://github.com/justuno-com/m2/issues/21
Expand Down
5 changes: 5 additions & 0 deletions Controller/Response/Catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ function execute() {return R::p(function() {
* «Filters do not work for `catalog`»: https://github.com/justuno-com/m2/issues/5
*/
Filter::p($pc);
# 2020-11-23
# 1) "The `jumagext/response/catalog` response does not contain disabled products":
# https://github.com/justuno-com/m2/issues/19
# 2) @todo It solves the problem only if the flat mode is disabled.
ju_pc_preserve_absent($pc);
$pc->addMediaGalleryData(); # 2019-11-20 https://magento.stackexchange.com/a/228181
$brand = ju_cfg('justuno_settings/options_interface/brand_attribute'); /** @var string $brand */
return array_values(ju_map($pc, function(P $p) use($brand) { /** @var array(string => mixed) $r */
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "justuno.com/m2"
,"version": "1.4.5"
,"version": "1.4.6"
,"description": "Justuno module for Magento 2"
,"type": "magento2-module"
,"homepage": "https://github.com/justuno-com/m2"
Expand All @@ -11,7 +11,7 @@
,"homepage": "https://mage2.pro/users/dmitry_fedyuk"
,"role": "Developer"
}]
,"require": {"justuno.com/core": ">=1.0.2"}
,"require": {"justuno.com/core": ">=1.0.3"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Justuno\\M2\\": ""}}
,"keywords": ["Magento 2"]
}

0 comments on commit 56c8687

Please sign in to comment.