Change mouseover/hover to onmouseclick

  • Posts: 64
  • Thank you received: 5
11 years 8 months ago #90427

On the product page I have the option to show more than 1 image. So I added a couple. These are displayed as small images underneath the main image. Now if you hover over these small images, they appear as the main image, very nice. But I would like to change this into: when you click the small image, it appears. Reason: on touch-devices you can't hover..

I know I should ask one question but on the same subject: I have a responsive (100%) artisteer template. These small images below the main image change into large images if you look on like an iphone. They become as large as the main image and that looks weird..

Thanks!

Last edit: 11 years 8 months ago by Dafilla.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #90584

Hi,

Edit the view "product / show_block_img" and replace the line:

echo $this->image->display($image->file_path, 'hikashop_main_image'.$variant_name, $image->file_name, 'class="hikashop_child_image"','', $width,  $height);
By:
					$link = $this->image->display($image->file_path, 'hikashop_main_image'.$variant_name, $image->file_name, 'class="hikashop_child_image"','', $width,  $height);
					$pattern = '/onclick/';
					$replace = '';
					$link = preg_replace($pattern,$replace, $link);
					$pattern = '/onmouseover/';
					$replace = 'onclick';
					$link = preg_replace($pattern,$replace, $link);
					echo $link;

The following user(s) said Thank You: Dafilla

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 5
11 years 8 months ago #90695

Worked like a champ!

Thanks!

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum