Home › Forums › Basel support forum › Problem with WooCommerce Video Plugins
Problem with WooCommerce Video Plugins
- This topic has 9 replies, 2 voices, and was last updated 8 years, 8 months ago by
Artem Temos.
-
AuthorPosts
-
August 15, 2016 at 6:17 am #2733
[email protected]ParticipantHi guys,
i’m trying to use video instead of featured image, but none of the plugins can actually do the job, because of the custom image gallery used in the Basel Theme.
The plugins i’ve already tested:1) https://codecanyon.net/item/videos-plugin-for-woocommerce/11425598?s_rank=3
2) https://yithemes.com/themes/plugins/yith-woocommerce-featured-audio-video-content/
3) https://bg.wordpress.org/plugins/yith-woocommerce-featured-video/Link to product with video: http://dev.malchugani.com/produkt/teifoc-4500-lyatna-vila-2-modela-130-chasti/
The YITH plugin (free or premium) place the video as featured, but it’s always shown at front and the image gallery cannot be used. I’ve saw that the custom gallery didn’t recognize the video as gallery element and the video itself use display: none; for the first image element.
Can you advise how to proceed and how to use both video as featured and image gallery.
I think an option would be if default gallery could be used or to give us some advise how to fix the problem above.Best Regards
August 15, 2016 at 9:51 am #2740
Artem TemosKeymasterHello,
Thank you for contacting us.
Unfortunately, we don’t have any instruction about how to quickly implement those plugins functions with our custom product images gallery. Probably you will need to disable our gallery at all and start customizing standard woocommerce one, that should be compatible with those plugins. You can disable our gallery by removing (or simply rename) the following files
basel/woocommerce/single-product/product-image.php basel/woocommerce/single-product/product-thumbnails.php
Regards
August 16, 2016 at 7:37 am #2751
[email protected]ParticipantHi,
I’ve tried to delete the files, but it doesn’t put the standard Woo Gallery. I’ve attached how it looks like.
Link: http://dev.malchugani.com/produkt/teifoc-4500-lyatna-vila-2-modela-130-chasti/
Also i’ve tried to add Jquery click event on the first image to hide the featured video when it’s pressed, but due to the preventDefault() function it doesn’t work.
Code:
$(“.current-image”).on(“click”, function() {
$(“.ywcfav_has_featured”).show();
});Please if it’s possible can you just write me the correct jquery code and i think this is all.
Best Regards
August 16, 2016 at 1:13 pm #2759
Artem TemosKeymasterActually it is standard gallery but without styles and scripts. And here is the right code for click event
$("body").on("click", ".current-image" function() { $(".ywcfav_has_featured").hide(); });
August 16, 2016 at 4:33 pm #2767
[email protected]ParticipantHi,
i’ve replace the code with yours but with no result again. The code is in the “On document ready” field.
Link: http://dev.malchugani.com/produkt/teifoc-4500-lyatna-vila-2-modela-130-chasti/
When I inspect the code, the things that I see as JS script on the image links are:
1) dragstart …. /wp-content/themes/basel/js/theme.min.js?ver=4.5.3:4
function(a) {
a.preventDefault()
}
2) dragstart …. /wp-includes/js/jquery/jquery.js?ver=1.12.4:3
k = r.handle = function(a) {
return “undefined” == typeof n || a && n.event.triggered === a.type ? void 0 : n.event.dispatch.apply(k.elem, arguments)
}And on the body I see the click events, but this click event from the document ready field isn’t there. I think when it’s used the “$(“body”).on” the code must be visible somewhere when I inspect it.
Where I go wrong? Is there any other place where I can put the code and to be executed properly?
Thanks for the clarification and help so far.
Best RegardsAugust 16, 2016 at 5:24 pm #2774
Artem TemosKeymasterWe see two errors in your JS console. First comes from this custom JS https://gyazo.com/807c4bab5f199861caeae9d7f8c85a1f please remove it. And second about your code snippet, try to change it to this one
jQuery("body").on("click", ".current-image", function() { jQuery(".ywcfav_has_featured").hide(); });
August 17, 2016 at 12:17 pm #2798
[email protected]ParticipantI’ve disabled the zopim widget and now there is no error. But also there is no success with the new jquery code.
Best Regards
August 17, 2016 at 4:20 pm #2804
Artem TemosKeymasterThere is one more error in your JS https://gyazo.com/3be875b7e8b301b5a1567fc9feac9aa7
August 17, 2016 at 8:17 pm #2811
[email protected]ParticipantOh,
sorry. I didnt saw this. Now it’s gone.
Best Regards
August 17, 2016 at 8:31 pm #2814
Artem TemosKeymasterOkay, we moved your code to the “Document ready” section, now it works as you expected.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register