WooCommerce Variation Gallery on Product Page

51
June 04, 2021, at 10:00 AM

I am looking to use a products variation images in a gallery on the product page instead of a dropdown and in place of the regular product gallery, and when the image is clicked the variation data is loaded (preferably without reloading the page).

I can get the variation images with the below code and then hook that into the product page -

$variations = $product->get_available_variations();

foreach ( $variations as $variation ) {
       echo "<img src=" . $variation['image']['thumb_src'] .">";
}

But how to link the variation image to the Variation Product? And if possible using Ajax reload, is some type of override in the variation.php template required?

READ ALSO
How to remove unwanted packages from node_modules? npm rm doesn&#39;t work

How to remove unwanted packages from node_modules? npm rm doesn't work

I can't for the life of me figure out an easy way to remove packages from node_modules

67
How to view logs of custom process event listeners in jBPM

How to view logs of custom process event listeners in jBPM

I have created a custom process listener, deployed to a project and ran the project

69
MySQL database-dump import

MySQL database-dump import

I need some details on importing and exporting a MySQL 8 database

90
reactjs with material ui - appbar doesn&#39;t support gradients

reactjs with material ui - appbar doesn't support gradients

I created my own appbar for my own selfproject, and i also use Erica One fontI just started the project so there is not enough code anyway

93