Home › Forums › WoodMart support forum › Zoom on the product page
Zoom on the product page
- This topic has 12 replies, 2 voices, and was last updated 11 months ago by
Luke Nielsen.
-
AuthorPosts
-
April 2, 2024 at 3:47 pm #554268
andrzejParticipantlook 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?
April 2, 2024 at 5:55 pm #554314
Luke NielsenKeymasterHello,
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
April 2, 2024 at 6:00 pm #554315
andrzejParticipantLook private message
April 2, 2024 at 6:01 pm #554317
andrzejParticipantadress www in private message
April 3, 2024 at 9:48 am #554443
Luke NielsenKeymasterHello,
Use the code below for help:
.single-product .pswp__button--zoom { display: none; }
Define it in Theme Settings -> Custom CSS.
Kind Regards
April 3, 2024 at 12:27 pm #554542
andrzejParticipantOK, 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?April 3, 2024 at 3:29 pm #554614
Luke NielsenKeymasterHello,
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
April 3, 2024 at 4:39 pm #554636
andrzejParticipantLook 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 valueAttachments:
You must be logged in to view attached files.April 3, 2024 at 4:46 pm #554641
Luke NielsenKeymasterRemove 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
-
This reply was modified 11 months ago by
Luke Nielsen.
April 3, 2024 at 4:57 pm #554648
andrzejParticipantNot 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.April 3, 2024 at 5:28 pm #554677
Luke NielsenKeymasterHello,
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
April 3, 2024 at 5:33 pm #554683
andrzejParticipantOK, now it work very good. Thank you!
April 4, 2024 at 10:23 am #554833
Luke NielsenKeymasterHello,
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
-
This reply was modified 11 months ago by
-
AuthorPosts
The topic ‘Zoom on the product page’ is closed to new replies.
- You must be logged in to create new topics. Login / Register