Template like Woocommerce sale shortcode

<?php /** see https://d.pr/i/s6ejE0 to show where each code block goes in a facetwp template **/ ?>

<?php /** display code setting in advanced mode, adjust as needed,
  this should replicate your woocommerce theme design **/
if ( have_posts() ) {
	do_action( 'woocommerce_before_shop_loop' );
	woocommerce_product_loop_start();
	while ( have_posts() ) {
		the_post();
		do_action( 'woocommerce_shop_loop' );
		wc_get_template_part( 'content', 'product' );
	}
	woocommerce_product_loop_end();
	do_action( 'woocommerce_after_shop_loop' );
} else {
	do_action( 'woocommerce_no_products_found' );
}
?>

<?php /** for query in advanced mode, adjust as needed,
  the "post_in" argment is what gets the sale posts **/

return [
  "post_type" => [
    "product"
  ],
  "post_status" => [
    "publish"
  ],
  "orderby" => [
    "date" => "DESC"
  ],
  "posts_per_page" => 10,
  "post__in" => array_merge( array( 0 ), wc_get_product_ids_on_sale() )
];
    
?>