From 9e88bf1f1c5ca1037af27428b165e425bb452cfa Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 25 Jun 2019 15:41:20 +0200 Subject: [PATCH] NEW multilangs in fetch_lines --- htdocs/commande/class/commande.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 4eb3b3236e0..553d3c501c8 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1890,8 +1890,9 @@ class Commande extends CommonOrder * @param int $only_product Return only physical products * @return int <0 if KO, >0 if OK */ - public function fetch_lines($only_product = 0) + public function fetch_lines($only_product = 0, $loadalsotranslation = 0) { + global $langs, $conf; // phpcs:enable $this->lines=array(); @@ -1983,6 +1984,13 @@ class Commande extends CommonOrder $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->fetch_optionals(); + + // multilangs + if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { + $line = new Product($this->db); + $line->fetch($objp->fk_product); + $line->getMultiLangs(); + } $this->lines[$i] = $line;