diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 4056d9d525c..5813c45047a 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -3383,7 +3383,7 @@ class Form
$opt .= ' disabled';
}
if (!empty($objp->idprodfournprice) && $objp->idprodfournprice > 0) {
- $opt .= ' data-qty="'.$objp->quantity.'" data-up="'.$objp->unitprice.'" data-discount="'.$outdiscount.'"';
+ $opt .= ' data-product-id="'.$objp->rowid.'" data-price-id="'.$objp->idprodfournprice.'" data-qty="'.$objp->quantity.'" data-up="'.$objp->unitprice.'" data-discount="'.$outdiscount.'"';
}
$opt .= ' data-description="'.dol_escape_htmltag($objp->description, 0, 1).'"';
$opt .= ' data-html="'.dol_escape_htmltag($optlabel).'"';
diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php
index 8b6da7e0b75..2a39e6e4730 100644
--- a/htdocs/public/opensurvey/studs.php
+++ b/htdocs/public/opensurvey/studs.php
@@ -165,7 +165,9 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) { // bo
$application = ($conf->global->MAIN_APPLICATION_TITLE ? $conf->global->MAIN_APPLICATION_TITLE : 'Dolibarr ERP/CRM');
- $body = str_replace('\n', '
', $langs->transnoentities('EmailSomeoneVoted', $nom, getUrlSondage($numsondage, true)));
+ $link = getUrlSondage($numsondage, true);
+ $link = ''.$link.'';
+ $body = str_replace('\n', '
', $langs->transnoentities('EmailSomeoneVoted', $nom, $link));
//var_dump($body);exit;
$cmailfile = new CMailFile("[".$application."] ".$langs->trans("Poll").': '.$object->title, $email, $conf->global->MAIN_MAIL_EMAIL_FROM, $body, null, null, null, '', '', 0, -1);
diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php
index d4fc03724d0..b7fc3d620f5 100644
--- a/htdocs/variants/class/ProductCombination.class.php
+++ b/htdocs/variants/class/ProductCombination.class.php
@@ -715,6 +715,10 @@ class ProductCombination
$price_impact = $forced_pricevar;
}
+ if (!array($price_var_percent)) {
+ $price_var_percent[1] = (float) $price_var_percent;
+ }
+
$newcomb = new ProductCombination($this->db);
$existingCombination = $newcomb->fetchByProductCombination2ValuePairs($product->id, $combinations);
@@ -787,7 +791,7 @@ class ProductCombination
$newproduct->description .= ''.$prodattr->label.': '.$prodattrval->value;
}
- $newcomb->variation_price_percentage = $price_var_percent;
+ $newcomb->variation_price_percentage = $price_var_percent[1];
$newcomb->variation_price = $price_impact[1];
$newcomb->variation_weight = $weight_impact;
$newcomb->variation_ref_ext = $this->db->escape($ref_ext);