remove unecessary code
already done by ::createProductCombination
This commit is contained in:
parent
76fd794559
commit
6484ba10c5
@ -1372,18 +1372,13 @@ class Products extends DolibarrApi
|
||||
}
|
||||
|
||||
$prodcomb = new ProductCombination($this->db);
|
||||
if (! $prodcomb->fetchByProductCombination2ValuePairs($id, $features))
|
||||
{
|
||||
$result = $prodcomb->createProductCombination(DolibarrApiAccess::$user, $this->product, $features, array(), $price_impact_is_percent, $price_impact, $weight_impact, $reference);
|
||||
if ($result > 0)
|
||||
{
|
||||
return $result;
|
||||
} else {
|
||||
throw new RestException(500, "Error creating new product variant");
|
||||
}
|
||||
} else {
|
||||
return $prodcomb->id;
|
||||
}
|
||||
$result = $prodcomb->createProductCombination(DolibarrApiAccess::$user, $this->product, $features, array(), $price_impact_is_percent, $price_impact, $weight_impact, $reference);
|
||||
if ($result > 0)
|
||||
{
|
||||
return $result;
|
||||
} else {
|
||||
throw new RestException(500, "Error creating new product variant");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user