From 3d926ff3a180b19c176dcdcfeced966891005374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric?= <35066297+c3do@users.noreply.github.com> Date: Fri, 4 Sep 2020 11:38:40 +0200 Subject: [PATCH] use function getFkProductParentByFkProductChild --- htdocs/product/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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").'';