Tagged: Lightbox, woocommerce
-
AuthorPosts
-
July 25, 2014 at 3:48 am #295771
Hello!
I am using woocommerce and enfold tofether to creat an online digital shopping marketplace. I want to be able to disable the product page images in the gallery and main featured image from being opened up in a lightbox where someone can download the file and take the image without paying for it. Is this possible? If so please help!Thanks in advanced! Best theme on the planet!
July 25, 2014 at 4:42 am #295782Also I meant to say I added the css mentioned in another post and it only disabled lightbox on the main image on the product page but when you click on thumbnail below on the gallery those open up to a large lightbox which I want to disable.
July 25, 2014 at 2:53 pm #295962Hi!
Please add following code to Quick CSS in Enfold theme options under General Styling tab
.single-product-main-image { pointer-events: none; }
that would make thumbnails not clickable. We would recommend using watermark on your images :)
Best regards,
YigitJuly 25, 2014 at 4:45 pm #296025Okay that worked great. However is there a way that people can click the small thumbnails in the gallery and it shows the preview on the main window in the product page? So when they click whatever box instead of it poping up in a lightbox it would just show that image in the main box?
July 28, 2014 at 4:50 pm #296872Hey!
Yes, open up wp-content/themes/enfold/config-woocommerce/config.php and replace:
return sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" rel="prettyPhoto' . $gallery . '">%s</a>', $image_link, $image_title, $image);
with
return sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom noLightbox" title="%s">%s</a>', $image_link, $image_title, $image);
and:
$img = sprintf( '<a href="%s" class="%s" title="%s" rel="prettyPhoto[product-gallery]">%s</a>', $image_link, $image_class, $image_title, $image );
with
$img = sprintf( '<a href="%s" class="%s noLightbox" title="%s" rel="prettyPhoto[product-gallery]">%s</a>', $image_link, $image_class, $image_title, $image );
If you want to overwrite the default code with a child theme add the avia_woocommerce_gallery_thumbnail_description() and avia_woocommerce_post_thumbnail_description() function to the child theme functions.php file and modify the code there.
Regards,
PeterJuly 28, 2014 at 8:25 pm #296969I am using the child theme. Can you expound on how to do that. I am a bit unclear.
July 28, 2014 at 8:39 pm #296974I added the code. Now it won’t pop up in any light box since I added the first code you gave me. After adding second code snippets it still wont show the small gallery image once clicked into the main image window above gallery below on the product page.
August 2, 2014 at 9:59 am #299115Hi!
Please check if a plugin or custom code breaks the image links. I noticed that
1) The right click events are blocked
2) Something covers the image links and I can’t even click on the thumbnails.Cheers!
PeterAugust 2, 2014 at 10:05 am #299119Hey!
I think this code breaks the html source code:
<a href="http://ministrymarketplace.net/vendor/dustin-cooper/" title"More products from Dustin Cooper">More products from Dustin Cooper</a>
because the = is missing between the title attributes and the quotes “”: http://validator.w3.org/check?uri=http%3A%2F%2Fministrymarketplace.net%2Fproduct%2Fnothing-series%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
The code should look like:
<a href="http://ministrymarketplace.net/vendor/dustin-cooper/" title="More products from Dustin Cooper">More products from Dustin Cooper</a>
Cheers!
PeterAugust 4, 2014 at 4:52 pm #299750I disabled the plugin that blocks all right clicks. Can you try again to see what I can do to get those gallery images displaying upon click in the main product page window.
http://ministrymarketplace.net/product/hardcore-discipleship/
August 7, 2014 at 4:40 pm #301184Hi!
I think I found a typo in my first code. The first line/replacement code should be:
return sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom noLightbox" title="%s">%s</a>', $image_link, $image_title, $image);
I also corrected it in my last post: https://kriesi.at/support/topic/disable-lightbox-on-all-product-pages/#post-296872
Best regards,
PeterOctober 21, 2015 at 2:09 am #522105Hi,
I have the same problem … I make all the changes you describe ..but it doesn’t work ..
I disable the lightbox ..but I want that when they click on the scond image (back of the t-shirt) it would just show that image in the main box.
Take a look here :
http://1508923.com/product/pulp-hawaii-dri-fit-shirt-men#about
What can I do ?
ThanksRaoul
October 21, 2015 at 11:37 pm #522601@raoulbeltra
not sure if I understand correctly. Can you explain further please? because I can’t see any issue on the website you have provided. Lightbox is deactivated and everything seems to be fine to me.Best regards,
AndyOctober 22, 2015 at 12:36 am #522622Hi @Andy,
What I want is that when you press the pictures on the gallery (the back of the t-shirt) it switch on the main box (the bigger image) and the front of the T-shirt go to the gallery ..so I can zoom on it with the plug I have installed… Now you are only able to zoom on the front of the T-shirt and not on the back one … There is also a problem : when you click on the pictures it open it and I don’t want it.An example of what I want ..you can see it here :
http://store.nike.com/us/en_us/pd/therma-sphere-max-training-jacket/pid-10288684/pgid-10278441
Is not wordpress of course… but are able to switch the gallery pictures on the main box and zoom on it.
Thanks for your help
RaoulOctober 22, 2015 at 8:15 pm #523272Hey!
does it work when you deactivate the plugin you are using? It seems to me that there is a conflict unfortunately. Deactivate all other plugins as well, to double check and let us know about your results.
Best regards,
Andy- This reply was modified 9 years, 1 month ago by Andy.
October 22, 2015 at 8:29 pm #523281Hi @Andy,
All the plugins are now deactivated and it doesn’t work …Can you take a look now with no plug-ins
ThanksRaoul
October 23, 2015 at 3:02 pm #523873Hey!
we need admin access to have a deeper look into it. Post login details here as private reply and we’ll take a look.
Cheers!
AndyOctober 23, 2015 at 9:00 pm #524102Please find the details in the private content !
Thank you so much !Raoul
October 26, 2015 at 7:51 pm #525161Hi any news ?
Thank you so much
RaoulOctober 28, 2015 at 9:40 am #525953Hey!
I’m sorry but this will require customization that is outside the scope of support. The original thread is about disabling the lightbox entirely on product pages but what you’re asking is kind of different. You have to use plugins like this:
https://www.magictoolbox.com/magiczoom/
https://www.magictoolbox.com/woocommerce/Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.