diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 32c50ccb661..bfb630f4eb9 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1912,9 +1912,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) if (!empty($conf->variants->enabled) && ($object->isProduct() || $object->isService())) { $combination = new ProductCombination($db); - if ($combination->fetchByFkProductChild($object->id) > 0) { + if (($fk_product_parent = $combination->getFkProductParentByFkProductChild($object->id)) > 0) { $prodstatic = new Product($db); - $prodstatic->fetch($combination->fk_product_parent); + $prodstatic->fetch($fk_product_parent); // Parent product print ''.$langs->trans("ParentProduct").'';