Display attributes infos when get product variants
This commit is contained in:
parent
398f0e00f7
commit
8fbf853b94
@ -1133,7 +1133,14 @@ class Products extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
$prodcomb = new ProductCombination($this->db);
|
$prodcomb = new ProductCombination($this->db);
|
||||||
return $prodcomb->fetchAllByFkProductParent((int) $id);
|
$combinations = $prodcomb->fetchAllByFkProductParent((int) $id);
|
||||||
|
|
||||||
|
foreach ($combinations as $key => $combination) {
|
||||||
|
$prodc2vp = new ProductCombination2ValuePair($this->db);
|
||||||
|
$combinations[$key]->attributes = $prodc2vp->fetchByFkCombination((int) $combination->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $combinations;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1159,7 +1166,14 @@ class Products extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
$prodcomb = new ProductCombination($this->db);
|
$prodcomb = new ProductCombination($this->db);
|
||||||
return $prodcomb->fetchAllByFkProductParent((int) $this->product->id);
|
$combinations = $prodcomb->fetchAllByFkProductParent((int) $this->product->id);
|
||||||
|
|
||||||
|
foreach ($combinations as $key => $combination) {
|
||||||
|
$prodc2vp = new ProductCombination2ValuePair($this->db);
|
||||||
|
$combinations[$key]->attributes = $prodc2vp->fetchByFkCombination((int) $combination->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $combinations;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user