commit
431337e9e8
@ -1073,7 +1073,7 @@ class Product extends CommonObject
|
|||||||
$comb = new ProductCombination($this->db);
|
$comb = new ProductCombination($this->db);
|
||||||
|
|
||||||
foreach ($comb->fetchAllByFkProductParent($this->id) as $currcomb) {
|
foreach ($comb->fetchAllByFkProductParent($this->id) as $currcomb) {
|
||||||
$currcomb->updateProperties($this);
|
$currcomb->updateProperties($this, $user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -248,7 +248,7 @@ class ProductCombination
|
|||||||
$parent = new Product($this->db);
|
$parent = new Product($this->db);
|
||||||
$parent->fetch($this->fk_product_parent);
|
$parent->fetch($this->fk_product_parent);
|
||||||
|
|
||||||
$this->updateProperties($parent);
|
$this->updateProperties($parent, $user);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -315,11 +315,12 @@ class ProductCombination
|
|||||||
* Updates the weight of the child product. The price must be updated using Product::updatePrices
|
* Updates the weight of the child product. The price must be updated using Product::updatePrices
|
||||||
*
|
*
|
||||||
* @param Product $parent Parent product
|
* @param Product $parent Parent product
|
||||||
|
* @param User $user Object user
|
||||||
* @return int >0 OK <0 KO
|
* @return int >0 OK <0 KO
|
||||||
*/
|
*/
|
||||||
public function updateProperties(Product $parent)
|
public function updateProperties(Product $parent, User $user)
|
||||||
{
|
{
|
||||||
global $user, $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user