Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Zoom Effect(SKU# FLEX-00005)

TOPIC: How to remove the "Left/Right" navigation button?

How to remove the "Left/Right" navigation button? 11 years 1 month ago #2886

Dear Flexible Webdesign Team,

How can I remove the left/right Navigation Button underneath the Product image in case there are less than 2 images?

Since the option is selected to show only 2 images, in case we only have 2 images it doesn't make sense to alow the customer to move left / right.

Please let me know.

Thanks!

Robin
The topic has been locked.

How to remove the "Left/Right" navigation button? 11 years 1 month ago #2889

This is what I did. The only bummer is that if you want to have the thumbnail divs float left there is some additional padding/margin that can't be removed from div.flexible-zoom-additionalImagesWrap & ul.additionalImagesslider width and height.

modules/mod_vm_flexible_zoom_effect/media/flexible-zoom.css

.flexible-zoom-additionalImagesWrap .more-views-arrow {
display:none;
}
.flexible-zoom-additionalImagesWrap .prev{
display:none;
}
.flexible-zoom-additionalImagesWrap .prev:hover{
display:none;
}
.flexible-zoom-additionalImagesWrap .next{
display:none;
}
.flexible-zoom-additionalImagesWrap .next:hover{
display:none;
}
The topic has been locked.

How to remove the "Left/Right" navigation button? 11 years 1 month ago #2892

Thanks, but that will remove the buttons for good, won't it?

I only want them to disappear if there are 2 or less images to be displayed...If there are 3 or more image the buttons should be there.
The topic has been locked.

How to remove the "Left/Right" navigation button? 11 years 1 month ago #2897

Hi Robin,

the code handling this is in modules/mod_vm_flexible_zoom_effect/tmpl/default_images.php line 30
<?php // Showing The Additional Images
if(!empty($this->product->images) && count($this->product->images)>1) { ?>

you can see the code is only produced if the image count is greater than 1 .

You would need to add an extra 'if' sequence if (( count($this->product->images)>0)&&(count($this->product->images)<3)) before the above and display what you want then change the above to >3 and make it a elseif.....

something like this should work

Cheers
The topic has been locked.

How to remove the "Left/Right" navigation button? 11 years 1 month ago #2898

He thinks further - probably simpler after the if loop ~ line 48
 
<?php
 
if (count($this->product->images)<3) {
 
echo '<s-tyle type="text/css">
  .flexible-zoom-additionalImagesWrap .more-views-arrow,
.flexible-zoom-additionalImagesWrap .prev,
.flexible-zoom-additionalImagesWrap .prev:hover,
etc 
etc
 
 {
    display:none;
   }
  </style>';
}
 
?>
 
 

the echo '<s-tyle type="text/css"> above should be of course style but the editor keeps changing it
Last Edit: 11 years 1 month ago by John.
The topic has been locked.

How to remove the "Left/Right" navigation button? 11 years 1 month ago #2950

Hi,

John gave an excellent solution about it.

Maybe I should include this patch to zoom effect extension permanently. Maybe instead of CSS hiding, i should completely disable the scroller functionality, since scrolling is not necessary when there are less than 3 thumbnails.

Regards.
Case solved. Topic is closed.
The topic has been locked.
Time to create page: 0.102 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo