From 7c8207360303308ff87a669fd28396e589f94ec1 Mon Sep 17 00:00:00 2001 From: Chris Pook Date: Mon, 4 Oct 2021 11:14:39 +0100 Subject: [PATCH] Fix casting of product status to reflect correct value. (#33) --- app/code/Ometria/AbandonedCarts/etc/module.xml | 2 +- app/code/Ometria/Api/Controller/V2/Products.php | 2 +- app/code/Ometria/Api/etc/module.xml | 2 +- app/code/Ometria/Core/etc/module.xml | 2 +- composer.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/code/Ometria/AbandonedCarts/etc/module.xml b/app/code/Ometria/AbandonedCarts/etc/module.xml index 03e7713..add2217 100755 --- a/app/code/Ometria/AbandonedCarts/etc/module.xml +++ b/app/code/Ometria/AbandonedCarts/etc/module.xml @@ -1,4 +1,4 @@ - + diff --git a/app/code/Ometria/Api/Controller/V2/Products.php b/app/code/Ometria/Api/Controller/V2/Products.php index def62b0..0684e96 100644 --- a/app/code/Ometria/Api/Controller/V2/Products.php +++ b/app/code/Ometria/Api/Controller/V2/Products.php @@ -283,7 +283,7 @@ private function getProductData(ProductInterface $product) $productData[OmetriaProductInterface::IS_VARIANT] = (bool) $parentId != null ? true : false; $productData[OmetriaProductInterface::PARENT_ID] = $parentId; $productData[OmetriaProductInterface::ATTRIBUTES] = $this->getAttributes($product); - $productData[OmetriaProductInterface::IS_ACTIVE] = (bool) $product->getStatus() == ProductStatus::STATUS_ENABLED; + $productData[OmetriaProductInterface::IS_ACTIVE] = (bool) ($product->getStatus() == ProductStatus::STATUS_ENABLED); $productData[OmetriaProductInterface::STORES] = $product->getStoreIds(); $productData[OmetriaProductInterface::IS_IN_STOCK] = $this->inventoryService->getStockStatus($product); $productData[OmetriaProductInterface::QTY] = $this->inventoryService->getSalableQuantity($product); diff --git a/app/code/Ometria/Api/etc/module.xml b/app/code/Ometria/Api/etc/module.xml index 383d540..5ee782c 100755 --- a/app/code/Ometria/Api/etc/module.xml +++ b/app/code/Ometria/Api/etc/module.xml @@ -1,4 +1,4 @@ - + diff --git a/app/code/Ometria/Core/etc/module.xml b/app/code/Ometria/Core/etc/module.xml index 5586dfc..7b451fb 100755 --- a/app/code/Ometria/Core/etc/module.xml +++ b/app/code/Ometria/Core/etc/module.xml @@ -1,4 +1,4 @@ - + diff --git a/composer.json b/composer.json index fc11338..e5491b0 100755 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "ometria/magento2", "type": "magento2-module", - "version": "2.2.3", + "version": "2.2.4", "description": "Dev composer package for Ometria Extension", "authors": [ {