From ad15f3f1e9ab22d2d741f859cd57616042cc4f61 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Jul 2014 15:13:02 +0200 Subject: [PATCH] New: Add option PRODUCT_MAX_VISIBLE_PHOTO to limit number of photos shown on main product card. --- htdocs/product/fiche.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 94edbbd1d04..9d71e9cdc4c 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -1284,7 +1284,9 @@ else { print ''; print '
'; - if ($showphoto) print $object->show_photos($conf->product->multidir_output[$object->entity],1,1,0,0,0,80); + $maxvisiblephotos=(isset($conf->global->PRODUCT_MAX_VISIBLE_PHOTO)?$conf->global->PRODUCT_MAX_VISIBLE_PHOTO:5); + if ($conf->browser->phone) $maxvisiblephotos=1; + if ($showphoto) print $object->show_photos($conf->product->multidir_output[$object->entity],1,$maxvisiblephotos,0,0,0,80); if ($showphoto && $showbarcode) print '

'; if ($showbarcode) print $form->showbarcode($object); print '
';