From 4383f1d00c0188f1eb53a2ae2a9183475e110400 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Sep 2020 13:50:22 +0200 Subject: [PATCH] Update ProductCombination.class.php --- htdocs/variants/class/ProductCombination.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index b65957d0a89..a449ca5d237 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -234,10 +234,10 @@ class ProductCombination } /** - * Get fk_product_parent by fk_product_child + * Return the product id of the parent product of a variant product (Get fk_product_parent by fk_product_child) * - * @param int $fk_child Product row id - * @return int >0 OK <0 KO + * @param int $fk_child Product row id + * @return int >0 if OK, 0 if product is not a variant, <0 if KO */ public function getFkProductParentByFkProductChild($fk_child) { @@ -251,7 +251,7 @@ class ProductCombination } if (!$this->db->num_rows($query)) { - return -1; + return 0; } $row = $this->db->fetch_object($query);