Skip to content

Commit

Permalink
Merge pull request #224 from magmodules/release/1.18.2
Browse files Browse the repository at this point in the history
Release/1.18.2
  • Loading branch information
Marvin-Magmodules authored Apr 11, 2024
2 parents ffd4501 + 8e42d63 commit a703a08
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
5 changes: 1 addition & 4 deletions Model/Collection/Products.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,7 @@ public function joinPriceIndexLeft($collection, $websiteId)
*/
public function getParents($parentRelations, $config): ProductCollection
{
if (empty($parentRelations)) {
return $this->productCollection; //return empty product collection
}

$parentRelations = $parentRelations ?: [0];
$filters = $config['filters'];

if (!$config['flat']) {
Expand Down
4 changes: 2 additions & 2 deletions Model/Generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ public function generateByStore(
$parent = null;
if (!empty($parentRelations[$product->getEntityId()])) {
foreach ($parentRelations[$product->getEntityId()] as $parentId) {
if ($parent = $parents->getItemById($parentId)) {
continue;
if ($foundParent = $parents->getItemById($parentId)) {
$parent = $foundParent;
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions Model/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ public function getProductData($items, $config): array
try {
$productIds = $this->itemHelper->getProductIdsFromCollection($items);
$products = $this->productModel->getCollection($config, '', $productIds);
$this->productHelper->getInventoryData()->load($products->getColumnValues('sku'), $config);
$parentRelations = $this->productHelper->getParentsFromCollection($products, $config);
$parents = $this->productModel->getParents($parentRelations, $config);

Expand All @@ -342,8 +343,8 @@ public function getProductData($items, $config): array
if (!empty($parentRelations[$product->getEntityId()])) {
foreach ($parentRelations[$product->getEntityId()] as $parentId) {
/** @var Product $parent */
if ($parent = $parents->getItemById($parentId)) {
continue;
if ($foundParent = $parents->getItemById($parentId)) {
$parent = $foundParent;
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions Ui/Component/Listing/Column/Order/AbstractOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ public function __construct(
}

/**
* Returs imploded customer name
* Returns imploded customer name
*
* @param array $data
* @return string
*/
public function getCustomerName($data): string
public function getCustomerName(array $data): string
{
return implode(
' ',
[
$data['first_name'],
$data['middle_name'],
$data['last_name'],
$data['first_name'] ?? '-',
$data['middle_name'] ?? '',
$data['last_name'] ?? '-',
]
);
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magmodules/magento2-channable",
"description": "Channable integration for Magento 2",
"type": "magento2-module",
"version": "1.18.1",
"version": "1.18.2",
"license": "BSD-2-Clause",
"homepage": "https://github.com/magmodules/magento2-channable",
"require": {
Expand Down
2 changes: 1 addition & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<general>
<enable>0</enable>
<limit>250</limit>
<version>v1.18.1</version>
<version>v1.18.2</version>
</general>
<data>
<name_attribute>name</name_attribute>
Expand Down

0 comments on commit a703a08

Please sign in to comment.