Ina Code Blog

bunch of code in one place
« Magento: Display default Add to cart quantity
Magento: How to activate new theme? »


Dec
17

Magento: Image zoom: set initial zoom

Posted by admin in Magento

The main product image needed to be zoomed in a little when page loads.

Open Drugs Without Prescription file: /js/varien/product.js cialis usa and find at arounf line 89:

sliderValue:0,

and replace the value with the needed zoom value:

sliderValue:0.2,

Then find at around line 94:

this.scale(0);

and replace the value with the same zoom value:

this.scale(0.2);

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

5 Responses to “Magento: Image zoom: set initial zoom”

  1. Added by Mr. Mike on Feb at 14

    AWESOME!
    Thanks for posting this.
    Some of the Magento quirks are a bit maddening — it’s thanks to the helpful users like you that make the software usable.

    Thank YOU!

  2. Added by Tony on Apr at 5

    The image adjusts back to the wrong size if you zoom in to it and zoom out completely.???

  3. Added by Tony on Apr at 17

    I need it be zoom out some??

  4. Added by admin on May at 7

    @Tony: with this tip you can set only initial zoom for image. It zooms out to whole image size. To set zoom out a little use 0.1, witch gives you about 10% image zoom.

  5. Added by pLevin on Sep at 19

    yeaah..
    Thanks guys !
    so cool..

Leave a Reply

Comment