<?php
/*****************************************************************************************************************************************************
******************************************************************************************************************************************************
 
																	Product Module 1
 
*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function reza_product_module_1($option=false,$class ='',$excerpt_2 =false,$ratio_2=false,$image_size_2=false){
	global $post;
		$option=!empty($option)?$option:array();
	$excerpt =!empty($excerpt_2) ? reza_data($option,'excerpt_2'):reza_data($option,'excerpt');	
	
	if(!empty($ratio_2) && reza_data($option,'ratio_2')){
 		$option['ratio'] = reza_data($option,'ratio_2');
	}
	if(!empty($image_size_2) && reza_data($option,'image_size_2')){
 		$option['image_size'] = reza_data($option,'image_size_2');
	}
	
 	$countdown = reza_data($option,'countdown');
   	$meta_category = reza_data($option,'meta_category');    
 	$rating = reza_data($option,'rating');    
 	$addcart = reza_data($option,'addcart');    
 
	$thumbnail= wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), reza_data($option,'image_size','full') );
  	$post_thumbnail =!empty($thumbnail[0])?'':'rd-not-thumb';
  

  ?>
	<div class="rd-item rd-module-1 <?php echo esc_attr($class.' '.$post_thumbnail);?>">

	<div class="rd-post-product product" >
       
  					
		<?php  reza_product_thumb($option);?>
                     
                     
 		<div class="rd-details">
		
                             
			<?php
			 do_action( 'woocommerce_before_shop_loop_item_title' );

			if(!empty($meta_category)) reza_product_category($option);
			if(!empty($rating)) reza_product_rating(); 
 			reza_product_post_title($option);   
 
			reza_price();  

			if(empty($excerpt_2)){
				if(!empty($excerpt)) reza_product_excerpt($option);
				if(!empty($countdown)) reza_product_countdown();
				if(!empty($addcart)) reza_product_button();
			}
			do_action( 'woocommerce_after_shop_loop_item_title' );
 			?>
             
   
		</div>
       
 <div class="rd-product-tags">
        		<?php  reza_product_sale();
				reza_product_featured()?>
  		</div>

        
 	</div> 
 	</div> 
    
<?php  
}