Home Forums WoodMart support forum Zoom on the product page

Zoom on the product page

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #554268

    andrzej
    Participant

    look at 20s video on you tube https://youtu.be/7o2_RXNIlxA

    How to make:

    1. The magnifying glass for enlarging the photo has disappeared
    or
    2. To reduce the magnification to a specific value, e.g. half the same as now.

    The problem is that when I press the magnifying glass icon , the photo enlarges to 1:1 proportion and enlarged quality is very poor. Therefore, I want to either remove this magnification icon or reduce the magnification value.

    Can you give me solutions to these 2 solutions?

    #554314

    Luke Nielsen
    Keymaster

    Hello,

    I would like to request temporary admin access to the website to take a better look at the issue there.

    Looking forward to collaborating with you!

    Kind Regards

    #554315

    andrzej
    Participant

    Look private message

    #554317

    andrzej
    Participant

    adress www in private message

    #554443

    Luke Nielsen
    Keymaster

    Hello,

    Use the code below for help:

    .single-product .pswp__button--zoom {
        display: none;
    }

    Define it in Theme Settings -> Custom CSS.

    Kind Regards

    #554542

    andrzej
    Participant

    OK, it works.
    And the second variant, if I wanted to enlarge it, but not as much as it is, but half as much. So where to change the magnification value?

    #554614

    Luke Nielsen
    Keymaster

    Hello,

    Yep, the code below will help you with that as well. Define it in Theme Settings -> Custom JS -> On document ready.

    woodmartThemeModule.$document.on('wdPhotoSwipeBeforeInited', function( event, gallery ) {
    	gallery.options.getDoubleTapZoom = function (isMouseClick, item) {
    		if (isMouseClick || 'undefined' !== typeof item.html) {
    			return 1; // (Here you need to specify the size of the picture after clicking the "Enlarge" button. "1" means that the picture will be enlarged to its original size, if you want it to be enlarged only by half of its size, then you need to specify "0.5".)
    		} else {
    			return item.initialZoomLevel < 0.7 ? 1 : 1.33;
    		}
    	}
    });

    Kind Regards

    #554636

    andrzej
    Participant

    Look attachment, I inserted the code, changed the value as shown in the screenshot, but the zoom is still the same.
    If I did something wrong, please provide me with the correct code and show me where to change the zoom value

    Attachments:
    You must be logged in to view attached files.
    #554641

    Luke Nielsen
    Keymaster

    Remove the description of the value that returns: https://prnt.sc/Q4PVJckLNZMz. And move the code into the Custom JS area. You put it to the CSS area at the moment.

    Clear the cache and recheck the issue.

    Kind Regards

    #554648

    andrzej
    Participant

    Not work.

    I changed it to 0.3 to make the effect visible, but it doesn’t help. I’ve attached what the code looks like now. (I cleared the cache)

    Attachments:
    You must be logged in to view attached files.
    #554677

    Luke Nielsen
    Keymaster

    Hello,

    1. The PHP code cannot be defined in the areas for the CSS: https://prnt.sc/jqcobM6SOFHB, it could cause some issues on your website. The same with this one custom: https://prnt.sc/PigWtUXaCr48

    Those PHP customs codes you need to define in the functions.php file in your child theme to make it work. https://prnt.sc/S62mjVHIlILT

    2. As for the custom JS that I sent you, remove it from the CSS area as well: https://prnt.sc/eDOtrLMiE97A , and move it to Theme Settings -> Custom JS -> On document ready: https://prnt.sc/KkAw3fwgn1ss

    Kind Regards

    #554683

    andrzej
    Participant

    OK, now it work very good. Thank you!

    #554833

    Luke Nielsen
    Keymaster

    Hello,

    You are welcome! If you do not mind, can you please leave a 5 stars rating for our theme by going here: http://themeforest.net/downloads It will allow us to release more updates and provide dedicated support in the future. It would encourage our work a lot.

    Have a good day!

    Best Regards

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘Zoom on the product page’ is closed to new replies.