woocemerce insert video if exist infront of the thumbnails
Budget: €8 – €30 EUR
i use wordpress with woocomerce and the ali2woo module to import aliexpress products, during the import the meta info for the video of the product if exists is transfered to my website but to be able to show it i have somehow to enter some script code in the templte.
the support team of the ali2woo module provide me these details
this is to get the meta info
$video_data = get_post_meta(get_the_ID(), '_a2w_video', true);
if ( !empty($video_data) ) {
//this an url of a video from AliExpress
$product_video = $video_data['web_url'];
}
and this is the code for the player
<div id="product-video-container">
<video width="100%" height="315" controls>
<source src="<?php echo $product_video; ?>" type="video/mp4">
</video>
</div>
the product on my website is this
https://mypetstore.gr/product/cute-chihuahua-yorkie-dog-cat-harness-leash-set-warm-winter-pets-puppy-clothes-vest-small-dog-clothing-for-pug-french-bulldog/
the product on the aliexpress is this
https://www.aliexpress.com/item/1005003222092962.html
so you can see how i want the video to load and not in an extra tab.
the support team of the ali2woo module provide me these details
this is to get the meta info
$video_data = get_post_meta(get_the_ID(), '_a2w_video', true);
if ( !empty($video_data) ) {
//this an url of a video from AliExpress
$product_video = $video_data['web_url'];
}
and this is the code for the player
<div id="product-video-container">
<video width="100%" height="315" controls>
<source src="<?php echo $product_video; ?>" type="video/mp4">
</video>
</div>
the product on my website is this
https://mypetstore.gr/product/cute-chihuahua-yorkie-dog-cat-harness-leash-set-warm-winter-pets-puppy-clothes-vest-small-dog-clothing-for-pug-french-bulldog/
the product on the aliexpress is this
https://www.aliexpress.com/item/1005003222092962.html
so you can see how i want the video to load and not in an extra tab.