diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 7195c1476f3..073136e8807 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 (($fk_product_parent = $combination->getFkProductParentByFkProductChild($object->id)) > 0) { - $prodstatic = new Product($db); - $prodstatic->fetch($fk_product_parent); + if (($fk_product_parent = $combination->getFkProductParentByFkProductChild($object->id)) > 0) { + $prodstatic = new Product($db); + $prodstatic->fetch($fk_product_parent); // Parent product print ''.$langs->trans("ParentProduct").''; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index fb27e140cc2..697c51f09c4 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4482,7 +4482,7 @@ class Product extends CommonObject global $conf, $langs; $labelStatus = $labelStatusShort = ''; - + $langs->load('products'); if (!empty($conf->productbatch->enabled)) { $langs->load("productbatch"); } diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php index 533fc7ea9f4..bbc3a188137 100644 --- a/htdocs/variants/class/ProductAttribute.class.php +++ b/htdocs/variants/class/ProductAttribute.class.php @@ -118,16 +118,16 @@ class ProductAttribute extends CommonObject $query = $this->db->query($sql); if ($query) { - while ($result = $this->db->fetch_object($query)) { - $tmp = new ProductAttribute($this->db); - $tmp->id = $result->rowid; - $tmp->ref = $result->ref; - $tmp->ref_ext = $result->ref_ext; - $tmp->label = $result->label; - $tmp->rang = $result->rang; + while ($result = $this->db->fetch_object($query)) { + $tmp = new ProductAttribute($this->db); + $tmp->id = $result->rowid; + $tmp->ref = $result->ref; + $tmp->ref_ext = $result->ref_ext; + $tmp->label = $result->label; + $tmp->rang = $result->rang; - $return[] = $tmp; - } + $return[] = $tmp; + } } else dol_print_error($this->db);