THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

Rejoignez la communauté sur le Discord Thelia : https://discord.gg/YgwpYEE3y3

Offline


Hi,

I'm looking for a way to display a larger image of the product, when I hover over or click on the image of a product.

Kind regards, Hugo

Offline


Hello,

You'll have to implement this feature with a jQuery plugin like Elevate Zoom for example.

Offline


I'm a bit puzzled. And new to thelia. In which html or tpl do I add this?

Offline


Hi ! You would need to add add Eleveor Zoom script in templates\frontOffice\your-template\product.html

Offline


Still puzzeld sorry. Can you give me some sample code? And a hint to put the javascript where?

Kind regards.

Offline


Hi,
Add the code below in the product.html of your theme in the javascript initialization section for example

{block name="javascript-initialization"}
...
<script text="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/elevatezoom/2.2.3/jquery.elevatezoom.min.js"></script>

then you need to apply the elevateZoom() function with the wanted options to the target image.

      $(".slick-active > .zoomable").elevateZoom({
        zoomType: "inner",
        cursor: "crosshair"
      });

Offline


Hi,

First point succes. I see it in the html page.
Second point also in the html-page however nothing happens. What am I missing?
The shop is at www.hcie.fr

Regards, Hugo