Merge pull request #18680 from Hystepik/develop#2

Fix  #18604 : fix percentage on variant product
This commit is contained in:
Laurent Destailleur 2021-09-10 19:44:04 +02:00 committed by GitHub
commit 7eb3725862
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 .= '<strong>'.$prodattr->label.':</strong> '.$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);