dropdown list who load product woocommerce

admin

Administrator
Staff member
I'm building my custom wordpress template page and I would like to do a dropdown list (or anyone else) with selected product who, selected, appears in the bottom of the page !

Currently, I the best way I found is :

Code:
<form action="" method="get"><select name="type">
<option selected >product</option>
</form>

and at the bottom of the page in a div:

Code:
<?php 

if(isset($_GET['type']))

    echo do_shortcode('[product_page id="'.$_GET['type'].'"]');

else

?>

The code does the job, but I'm not satisfed yet ! If a plugin already exists with shortcode, I'll take it too !

EDIT: I would like to load the product without reload the page !

Thanks in advance !