You have copy the archive-product.php in your template folder in the woocomerce folder.
Then you edit the file and basically run a loop trough the catgeories you want (for example you category id’s are 12 and 24);
$product_categories = array(12,24);
foreach($product_categories as $category){
$product_options = array(
'posts_per_page' => -1,
'post_type' => 'product',
'orderby' => 'menu_order',
'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'product_cat',
'field' => 'term_id',
'terms' => (int)$category,
),
),
);
$product_query = new WP_Query($product_options); //get all products for this category
//OUTPUT YOUR PRODUCTS HERE
}//end foreach
Then you have all the products for one category in your $product_query query. adjust your output within the foreach loop and you are all set.