New: Add option PRODUCT_MAX_VISIBLE_PHOTO to limit number of photos

shown on main product card.
This commit is contained in:
Laurent Destailleur
2014-07-04 15:13:02 +02:00
parent 6144f90770
commit ad15f3f1e9

View File

@@ -1284,7 +1284,9 @@ else
{
print '<td valign="middle" align="center" width="25%" rowspan="'.$nblignes.'">';
print '<div class="photolist">';
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 '<br><br>';
if ($showbarcode) print $form->showbarcode($object);
print '</div>';