diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 46bb90f2efd..263d7678cb7 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -844,12 +844,12 @@ if ($_GET["id"] || $_GET["ref"]) // En mode visu print '
| '.$langs->trans("Ref").' | '; print $html->showrefnav($product,'ref','',1,'ref'); print ' | '; - $nblignes=4; + $nblignes=3; if (! empty($conf->global->PRODUIT_MULTIPRICES_LIMIT) && empty($socid)) $nblignes+=$conf->global->PRODUIT_MULTIPRICES_LIMIT; else $nblignes+=3; @@ -862,7 +862,7 @@ if ($_GET["id"] || $_GET["ref"]) } print '||||
| '.$langs->trans("Label").' | '.$product->libelle.' | ||||
| '.$langs->trans("Description").' | '.nl2br($product->description).' | ||||
| '.$langs->trans("Description").' | '.nl2br($product->description).' | ||||
| ';
-
- print '';
-
- // Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine
- if ($obj['photo_vignette'])
- {
- $filename='thumbs/'.$obj['photo_vignette'];
- }
- else
- {
- $filename=$obj['photo'];
- }
-
- // Nom affiche
- $viewfilename=$obj['photo'];
-
- // Taille de l'image
- $product->get_image_size($dir.$filename);
- $imgWidth = ($product->imgWidth < $maxWidth) ? $product->imgWidth : $maxWidth;
- $imgHeight = ($product->imgHeight < $maxHeight) ? $product->imgHeight : $maxHeight;
-
- print ' '.$viewfilename; - print ' '; - - // On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites - if (!$obj['photo_vignette'] && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i',$obj['photo']) && ($product->imgWidth > $maxWidth || $product->imgHeight > $maxHeight)) - { - print ''.img_refresh($langs->trans('GenerateThumb')).' '; - } - if ($user->rights->produit->creer || $user->rights->service->creer) - { - print ''; - print img_delete().''; - } - if ($nbbyrow) print ' | ';
- if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) print ''; - $nbphoto++; - } + $nbphoto=$product->show_photos($conf->produit->dir_output,1,1000,$nbbyrow,1,1); if ($nbphoto < 1) { - print ' |
| ';
+ print ' '; + print '
|
| '.$langs->trans("Ref").' | '; +// Ref +print ' | '.$langs->trans("Ref").' | '; print $html->showrefnav($product,'ref','',1,'ref'); print ' | '; + +$nblignes=3; +if (! empty($conf->global->PRODUIT_MULTIPRICES_LIMIT) && empty($socid)) $nblignes+=$conf->global->PRODUIT_MULTIPRICES_LIMIT; +else $nblignes+=3; + +if ($product->is_photo_available($conf->produit->dir_output)) +{ + // Photo + print ''; + $nbphoto=$product->show_photos($conf->produit->dir_output,1,1,0); + print ' | '; +} print '|
| '.$langs->trans("Label").' | '.$product->libelle.' | '; -print '||||
| '.$langs->trans("Label").' | '.$product->libelle.' | ||||
| '.$langs->trans("VATRate").' | '.vatrate($product->tva_tx,true).' | ||||
| '.$langs->trans("VATRate").' | '.vatrate($product->tva_tx,true).' | ||||
| '.$langs->trans("Status").' | '; +print ' | ||||
| '.$langs->trans("Status").' | '; print $product->getLibStatut(2); print ' | ||||