Perf: Minor perf enhancement
This commit is contained in:
parent
5cbb0359aa
commit
5b4b058399
@ -198,9 +198,10 @@ if ($id || $ref)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Number of subproducts
|
// Number of subproducts
|
||||||
$prodsfather = $product->getFather(); //Parent Products
|
$prodsfather = $product->getFather(); // Parent Products
|
||||||
$product->get_sousproduits_arbo();
|
$product->get_sousproduits_arbo();
|
||||||
$nbofsubproducts=count($product->get_arbo_each_prod());
|
$prods_arbo=$product->get_arbo_each_prod();
|
||||||
|
$nbofsubproducts=count($prods_arbo);
|
||||||
print '<tr><td>'.$langs->trans("AssociatedProductsNumber").'</td><td>';
|
print '<tr><td>'.$langs->trans("AssociatedProductsNumber").'</td><td>';
|
||||||
print $form->textwithpicto($nbofsubproducts, $langs->trans('IfZeroItIsNotAVirtualProduct'));
|
print $form->textwithpicto($nbofsubproducts, $langs->trans('IfZeroItIsNotAVirtualProduct'));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -209,7 +210,6 @@ if ($id || $ref)
|
|||||||
|
|
||||||
|
|
||||||
// List of products into this virtual product
|
// List of products into this virtual product
|
||||||
$prods_arbo = $product->get_arbo_each_prod();
|
|
||||||
if (count($prods_arbo) > 0)
|
if (count($prods_arbo) > 0)
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="2">';
|
print '<tr><td colspan="2">';
|
||||||
@ -226,7 +226,8 @@ if ($id || $ref)
|
|||||||
//print $productstatic->getNomUrl(1).'<br>';
|
//print $productstatic->getNomUrl(1).'<br>';
|
||||||
//print $value[0]; // This contains a tr line.
|
//print $value[0]; // This contains a tr line.
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')    </td>';
|
//print '<td>'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].($value['nb_total'] > $value['nb']?'->'.$value['nb_total']:'').')    </td>';
|
||||||
|
print '<td>'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb_total'].')    </td>';
|
||||||
if (! empty($conf->stock->enabled)) print '<td>'.$langs->trans("Stock").' : <b>'.$productstatic->stock_reel.'</b></td>';
|
if (! empty($conf->stock->enabled)) print '<td>'.$langs->trans("Stock").' : <b>'.$productstatic->stock_reel.'</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user