From 33475b8e92efea7112b9ca2cdc86cb2982c11135 Mon Sep 17 00:00:00 2001 From: MarcVJ <38230768+MarcVJ@users.noreply.github.com> Date: Tue, 11 Feb 2025 10:00:06 +0100 Subject: [PATCH] Added one line to allow use of price_ttc in calculated extra fields price_ttc sometimes needs to be used in extra fields to compute price ttc per kilo or per liter. Currently price_ttc does not compute in the product list, so price per kilo cannot compute either. This allows to add an extra field "Price TTC per kilo" like this : $object->price_ttc / $object->weight. $object->price_ttc will work because the added line puts price_ttc into $products_static, which is put in $object. --- htdocs/product/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index aa378d1c85c..d262f757909 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1628,6 +1628,7 @@ while ($i < $imaxinloop) { } $product_static->price = $obj->price; + $product_static->price_ttc = $obj->price_ttc; // Allows to use price_ttc in calculated extra fields (ex : price per kilo) $object = $product_static;