<?php

if (rad_is_shop_ajax_request()) {
    get_template_part("templates/core/nav/nav");
    get_template_part("templates/core/page/header"); // just add header in this case
} else {
    get_header();
}

?>
<div class="woocommercepage">
	<?php
	//Get the sidebar option
	$sidebarPos = rad_get_option("shop-sidebar-position");

	// shop and category page display options
	$display_type_shop_wc_setting = get_option("woocommerce_shop_page_display");
	$display_type_wc_setting      = get_option("woocommerce_category_archive_display");

	if (0 == $sidebarPos) {

	    if (is_product()) {
	        woocommerce_content();
	    } else if (is_shop() || is_product_category() || is_product_tag()) {?>
			<div class="row  <?php if ($display_type_shop_wc_setting == "subcategories" || $display_type_wc_setting == "subcategories") {?> shop_is_categories_style <?php }?>">
				<?php woocommerce_content();?>
			</div>
	        <?php
	    } else {?>
	        <div class="row">
		        <?php woocommerce_content();?>
	        </div>
		<?php
		}
	} else {?>
		<!-- has Sidebar -->
		<?php
		if (is_product()) {?>
			<div class="shop_coulmn3">
				<?php woocommerce_content();?>
			</div>
		<?php
		} else if (is_shop() || is_product_category() || is_product_tag()) {?>
			<div class="row  <?php if ($display_type_shop_wc_setting == "subcategories" || $display_type_wc_setting == "subcategories") {?> shop_is_categories_style <?php }?>">
				<?php woocommerce_content();?>
			</div>
        <?php
    	} else {?>
            <div class="row">
                <?php woocommerce_content();?>
            </div>
        <?php
    	}
	}?>
</div><!-- Page Content End -->
<?php
if (!rad_is_shop_ajax_request()) {
    get_footer();
}
?>