From 6fc444e045fb9a67cda6354e32b16ff3b86caadc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 24 Apr 2018 12:08:17 +0200 Subject: [PATCH] we can see what we are doing --- htdocs/variants/combinations.php | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 3460718c680..dbc413542c4 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -327,11 +327,31 @@ if (! empty($id) || ! empty($ref)) if ($action == 'add') { $title = $langs->trans('NewProductCombination'); + print dol_fiche_head(); + $features = $_SESSION['addvariant_'.$object->id]; + //First, sanitize + print '
'; + if (! empty($features)) { + foreach ($features as $feature) { + + $explode = explode(':', $feature); + + if ($prodattr->fetch($explode[0]) < 0) { + continue; + } + + if ($prodattr_val->fetch($explode[1]) < 0) { + continue; + } + + print '' . $prodattr->label . ':'. $prodattr_val->value . ' '; + } + } + print '
'; + print dol_fiche_end(); } else { $title = $langs->trans('EditProductCombination'); } - - print '
'; print_fiche_titre($title); if ($action == 'add') { @@ -346,8 +366,8 @@ if (! empty($id) || ! empty($ref)) foreach ($prodattr_all as $each) { $prodattr_alljson[$each->id] = $each; } - - ?> + + ?>