<?php global $qaleb;?>
<?php if($qaleb['shop-ac']=='1'){?>
<div class="polist">
<div class="title">
<h3><?php echo $qaleb['shop-title']; ?></h3>
<?php if($qaleb['shop-ar']=='1'){?>
<a href="<?php echo $qaleb['shop-link']; ?>"><?php echo $qaleb['shop-ar-ti']; ?></a>
<?php } ?>
</div>
<div class="woocommerce">
<ul class="products">
<?php
			  
			  if($qaleb['shop-content']=='1'){
				$arggs = array(
					'post_type' => 'product',
					'posts_per_page' => $qaleb['shop-count'],
				);
			  }else if($qaleb['shop-content']=='2'){
				$arggs = array(
					'post_type' => 'product',
					'posts_per_page' => $qaleb['shop-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['shop-content']=='3'){
				$arggs = array(
					'post_type' => 'product',
					'posts_per_page' => $qaleb['shop-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'product_cat',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['shop-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>		
<li <?php post_class( 'item' ); ?>>
	<?php
	do_action( 'woocommerce_before_shop_loop_item' );
	do_action( 'woocommerce_before_shop_loop_item_title' );
	do_action( 'woocommerce_shop_loop_item_title' );
	do_action( 'woocommerce_after_shop_loop_item_title' );
	do_action( 'woocommerce_after_shop_loop_item' );
	?>
</li>
 <?php endwhile; endif;  wp_reset_query(); ?>
</ul>
</div></div>
<?php } ?>