<?php
/**
 * The Template for displaying all single products
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/single-product.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
 * will need to copy the new files to your theme to maintain compatibility. We try to do this.
 * as little as possible, but it does happen. When this occurs the version of the template file will.
 * be bumped and the readme will list any important changes.
 *
 * @see 	    http://docs.woothemes.com/document/template-structure/
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */

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

get_header( 'shop' ); ?>

	<?php do_action( 'woocommerce_before_main_content' ); ?>
	
	<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
		
		<?php $your_shop_page = get_post( wc_get_page_id( 'shop' ) ); ?>
		<?php if(!get_post_meta($your_shop_page->ID, 'progression_studios_disable_page_title', true)): ?>
		<div id="page-title-pro" <?php if(get_post_meta($your_shop_page->ID, 'progression_studios_header_image', true)): ?>style="background-image:url('<?php echo esc_url( get_post_meta($your_shop_page->ID, 'progression_studios_header_image', true) );?>');"<?php endif; ?>>
			<div class="width-container-pro">
				<h1 class="entry-title-pro"><?php woocommerce_page_title(); ?></h1>
				<?php if(get_post_meta($your_shop_page->ID, 'progression_studios_sub_title', true)): ?><h4 class="progression-sub-title"><?php echo esc_html(get_post_meta($your_shop_page->ID, 'progression_studios_sub_title', true)); ?></h4><?php endif; ?>
				<div class="clearfix-pro"></div>
			</div>
		</div><!-- #page-title-pro -->
		<?php endif; ?>
	<?php endif; ?>
	
	<div id="content-pro" class="site-content">
		<div class="width-container-pro<?php if(get_post_meta($your_shop_page->ID, 'progression_studios_page_sidebar', true) == 'left-sidebar' ) : ?> left-sidebar-pro<?php endif; ?>">
			
			<?php if(get_post_meta($your_shop_page->ID, 'progression_studios_page_sidebar', true) == 'right-sidebar' ) : ?><div id="main-container-pro"><?php endif; ?>
			<?php if(get_post_meta($your_shop_page->ID, 'progression_studios_page_sidebar', true) == 'left-sidebar' ) : ?><div id="main-container-pro"><?php endif; ?>

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

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

				<?php endwhile; // end of the loop. ?>
				
				
				<?php do_action( 'woocommerce_after_main_content' ); ?>
	
	
				<?php if(get_post_meta($your_shop_page->ID, 'progression_studios_page_sidebar', true) == 'right-sidebar' ) : ?></div><!-- close #main-container-pro --><?php do_action( 'woocommerce_sidebar' ); ?><div class="clearfix-pro"></div><?php endif; ?>
				<?php if(get_post_meta($your_shop_page->ID, 'progression_studios_page_sidebar', true) == 'left-sidebar' ) : ?></div><!-- close #main-container-pro --><?php do_action( 'woocommerce_sidebar' ); ?><div class="clearfix-pro"></div><?php endif; ?>
				</div><!-- close #main-container-pro -->
				
					
		</div><!-- close .width-container-pro -->
	</div><!-- #content-pro -->
<?php get_footer( 'shop' ); ?>