Jump to content

[SOLVED] Can the picture in JQZoom be enlarge?


Recommended Posts

  • 1 month later...

@ Rocky.

your anwser / fix does not work anymore, at least not in 1.3.0.3...
You have to edit the product.js file in your theme directory.
>themes>your theme>js>product.js.

There you can find the jqzoom function (line 344 in 1.3.0.3) and change the default settings.
It will override the settings in the css>jqzoom.css file.
See the code here
You should change values in file /themes//js/product.js
line 344:

//set jqZoom parameters if needed
if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled)
{
 $('img.jqzoom').jqueryzoom({
   xzoom: 200, //zooming div default width(default width value is 200)
   yzoom: 200, //zooming div default width(default height value is 200)
   offset: 21 //zooming div default offset(default offset value is 10)
   //position: "right" //zooming div position(default position value is "right")
 });
}



Change xzoom and yzoom values…

Link to comment
Share on other sites

  • 10 months later...
  • 7 months later...

Hi Justin,Ignore me. Just being stupid and lazy. *Slaps head*

 

For example I want to make my Product image have JQZoom:

 

I do the following:

 

Link the jquery scripts, edit product.tpl > add the anchor to the relevant image tag.

 

How would the site differentiate between the big and small image though....the src of the anchor would be:

 

src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium')}"

 

is that correct?

 

 

Thanks

Link to comment
Share on other sites

Hey RickieSee,

 

What version of Prestashop are you using? I'm not sure when JQZoom was introduced into Prestashop, but if you go into the Back Office into Preferences > Products, there is an "Enable JQZoom" option that can be enabled and will automatically turn jqzoom on for all of your products.

 

Then to configure the jqzoom window (size, positioning, etc.), follow Uddhava's instructions posted above :)

 

Let me know if I totally misunderstood your question

 

Cheers,

Justin

Link to comment
Share on other sites

Hey RickieSee,

 

If the position value isn't working for you (it doesn't appear to work as advertised for me either), then use the offset value and make it negative. The offset value offsets that magnification window by X pixels to the right if you use positive values, but if you use negative values, it pushes that window to the left. So you'll want to use some large negative number that is at least the width of your magnification window (xzoom value) plus the width of your large image. So something like -900 for the offset attribute might be what you're looking for.

 

Justin

 

ps - make sure "position" is set back to the default "right" value.

Link to comment
Share on other sites

Dear experts,

 

the latest JQZoom now is 2.3 while the one that comes with prestashop is very old.

 

I've downloaded the latest version files from JQZoom.

 

But how can I update my prestashop to enable the latest Zoom version?

 

Waiting your expert help.

thanks.

Link to comment
Share on other sites

Hey Kanary,

 

I haven't personally updated it but this is how I'd start the process: (btw, I had PM'd these instructions to another member a few weeks ago and they said that it did not work for them. However I thought that this might help give you a starting point to work from.)

 

1. Download the new jqzoom

 

2. Extrace the jquery.jqzoom-core.js file from the downloaded .zip archive and rename it to jquery.jqzoom.js.

 

3. Replace js/jquery/jquery.jqzoom.js with the new file you just downloaded and renamed (I think replacing the file is not the best way to do it, but unless you want to start messing with js includes in the php files, then replacing it might be the easiest route to go)

 

4. In your product.js file, change this block of code:

 

$('img.jqzoom').jqueryzoom({

.../*variables placed in here*/

});

 

to this:

 

 

$('img.jqzoom').jqzoom({

../*variables placed in here*/

});

 

Some of the variable names are not the same in the new version so you will have to look at the new API documentation to see what the new variables are called. I know xzoom and yzoom are now called something different.

 

You'll have to do some more work to get it working from the sounds of that other members experience, but I'm not implementing it myself so this is about as much advice as I can give right now.

 

Cheers,

Justin

Link to comment
Share on other sites

×
×
  • Create New...