diff --git a/Model/ProductRepository.php b/Model/ProductRepository.php index a8ade0d..f39bf3c 100644 --- a/Model/ProductRepository.php +++ b/Model/ProductRepository.php @@ -370,7 +370,11 @@ private function getCategoriesInformation($categories) { $categoryIds = []; foreach ($categories as $category) { - $categoryIds[$category['category_id']] = true; + if(is_array($category)){ + $categoryIds[$category['category_id']] = true; + } else { + $categoryIds[$category->getCategoryId()] = true; + } } // Load paths of product categories to load their parents diff --git a/composer.json b/composer.json index b357e14..eaafef9 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "doofinder/doofinder-magento2", - "version": "0.13.4", + "version": "0.13.5", "description": "Doofinder module for Magento 2", "type": "magento2-module", "require": { diff --git a/etc/module.xml b/etc/module.xml index 782daf8..9383ae6 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - +