<?php
require_once('../../../../wp-config.php');

$category = $_POST["category"];
if ($category == "null"){
		$args = array(
		'post_type'      => 'product',
		'posts_per_page' => 1000,
		'orderby' => 'title',
		'order' => 'ASC'
	);
}else{
	$args = array(
		'post_type'      => 'product',
		'posts_per_page' => 1000,
		'product_cat'    => $category,
		'orderby' => 'title',
		'order' => 'ASC'
	);
}
$loop = new WP_Query( $args );
?>

<select id='selProduct' onChange="javasxcript:getproductdata();" style="min-width: 400px;">
	<option value='0'>Select Product</option>
<?php
    while ( $loop->have_posts() ) : $loop->the_post();
        global $product;?>
		 <option value='<?php echo get_the_id();?>'><?php echo get_the_title();?></option>
		<?php
    endwhile;

    wp_reset_query();
?>
</select>
<br />
<br/>