<?php
/**
* Footer Main File.
*
* @package MINIMALIN
* @author Marinothemes
* @version 1.0
*/
$options = minimalin_WSH()->option();
global $wp_query;
$page_id = ( $wp_query->is_posts_page ) ? $wp_query->queried_object->ID : get_the_ID();
$layout_switcher = $options->get( 'layout_switcher' );
?>
<div class="clearfix"></div>
<?php minimalin_template_load( 'templates/footer/footer.php', compact( 'page_id' ) ); ?>
<!-- Scroll to Top Button -->
</main>
<!--End Page Wrapper-->
<?php wp_footer(); ?>
<?php
// Fetch the products you want to display in the modal (you can modify the query here)
$args = array(
'post_type' => 'product',
'posts_per_page' => -1, // Show all products (you can limit this)
);
$query = new WP_Query( $args );
// Loop through products
if ( $query->have_posts() ) :
while ( $query->have_posts() ) : $query->the_post();
global $product; // WooCommerce product object
?>
<!-- Modal for Product Quick View -->
<div class="grid__quick__view__modal modalarea modal fade" id="exampleModal<?php echo get_the_ID(); ?>" tabindex="-1" aria-labelledby="exampleModal<?php echo get_the_ID(); ?>" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="modal-body">
<div class="row align-items-center">
<!-- Product Image -->
<div class="col-xl-6 col-lg-6 col-md-6">
<div class="grid__quick__img">
<?php echo get_the_post_thumbnail( get_the_ID(), array(448, 448) );?>
</div>
</div>
<!-- Product Details -->
<div class="col-xl-6 col-lg-6 col-md-6 col-12">
<div class="grid__quick__content">
<!-- Product Title -->
<h3><?php the_title(); ?></h3>
<!-- Product Price -->
<div class="quick__price">
<?php echo wc_price( $product->get_price() ); ?>
</div>
<!-- Product Description -->
<p><?php echo wp_kses_post( $product->get_short_description() ); ?></p>
<!-- Quantity Selector (Optional) -->
<div class="featurearea__quantity">
<div class="qty-container">
<button class="qty-btn-minus btn-qty" type="button"><i class="fa fa-minus"></i></button>
<input type="text" name="qty" value="1" class="input-qty">
<button class="qty-btn-plus btn-qty" type="button"><i class="fa fa-plus"></i></button>
</div>
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>?add-to-cart=<?php echo get_the_ID(); ?>" class="default__button">Add to cart</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
endwhile;
else :
echo '<p>No products found.</p>';
endif;
// Reset the WP_Query after the loop
wp_reset_postdata();
?>
</body>
</html>