<?php
/**
 * The Template for displaying all single products.
 *
 * Override this template by copying it to yourtheme/woocommerce/single-product.php
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     3.5.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

get_header( 'shop' ); ?>



<?php 
/* Custom Changes
 * Multiple layouts
 */
$product_layout = esc_attr(get_theme_mod( 'product_layout', 'fullwidth' ) );
	switch ($product_layout) {
	
	// shop full width layout
	case "fullwidth" : 
		echo '<div class="container"><div class="row"><div class="col-md-12">'; 				
    break;		        
	
	// shop left sidebar layout
	case "leftsidebar" :        
		echo '<div class="container"><div class="row"><div class="col-md-3">';   
			do_action( 'woocommerce_sidebar' );
		echo '</div>'; 	
		echo '<div class="col-md-9">';  		
	break;
	
	// shop right sidebar layout
	case "rightsidebar" : 
		echo '<div class="container"><div class="row"><div class="col-md-9">';				
     break;
	 
} 
?>

	<?php
		/**
		 * woocommerce_before_main_content hook.
		 *
		 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
		 * @hooked woocommerce_breadcrumb - 20
		 */
		do_action( 'woocommerce_before_main_content' );
	?>

		<?php while ( have_posts() ) : the_post(); ?>

			<?php wc_get_template_part( 'content', 'single-product' ); ?>

		<?php endwhile; // end of the loop. ?>

	<?php
		/**
		 * woocommerce_after_main_content hook.
		 *
		 * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
		 */
		do_action( 'woocommerce_after_main_content' );
	?>

	<?php
		/**
		 * woocommerce_sidebar hook.
		 *
		 * @hooked woocommerce_get_sidebar - 10
		 
		do_action( 'woocommerce_sidebar' );
		*/
	?>

	
	
<?php 
/* Custom Changes
 * Close custom layouts
 */
$product_layout = esc_attr(get_theme_mod( 'product_layout', 'fullwidth' ) );
	switch ($product_layout) {
	
	// shop full width layout
	case "fullwidth" : 
		echo '</div></div></div>'; 				
    break;		        
	
	// shop left sidebar layout
	case "leftsidebar" : 
		echo '</div></div></div>';                    						 		
	break;
		
	// shop right sidebar layout
	case "rightsidebar" : 
		echo '</div><div class="col-md-3">';   
			do_action( 'woocommerce_sidebar' );
		echo '</div></div></div>';                    									
     break;
	} 	
?>	
	
	
	

<?php get_footer( 'shop' ); ?>
