esc_html__( 'Display hot offer widget section.', 'acommerce' ), ) // Args ); } /** * Widget Form Section */ public function form( $instance ) { $acommerce_defaults = array( 'acommerce_saving_price_enable' => true, 'acommerce_saving_enable' => true, 'acommerce_total_sold_enable' => true, 'acommerce_total_avilable_price_enable' => true, 'acommerce_count_down_enable' => true, 'acommerce_hotoffer_sort_title' => '', 'acommerce_hotoffer_title' => '', 'acommerce_woo_category' => '', 'acommerce_number_posts' => 3, 'acommerce_product_order' => 'DESC', 'acommerce_hotoffer_style' => 'style_1', 'acommerce_background_img' => '' ); $instance = wp_parse_args( (array) $instance, $acommerce_defaults ); //producte category get $acommerce_taxonomy = 'product_cat'; $acommerce_empty = 1; $acommerce_orderby = 'name'; $acommerce_show_count = 0; // 1 for yes, 0 for no $acommerce_pad_counts = 0; // 1 for yes, 0 for no $acommerce_hierarchical = 1; // 1 for yes, 0 for no $acommerce_title = ''; $acommerce_args = array( 'taxonomy' => $acommerce_taxonomy, 'orderby' => $acommerce_orderby, 'show_count' => $acommerce_show_count, 'pad_counts' => $acommerce_pad_counts, 'hierarchical' => $acommerce_hierarchical, 'title_li' => $acommerce_title, 'hide_empty' => $acommerce_empty ); $acommerce_all_categorys = get_categories($acommerce_args); ?>

" name="get_field_name("acommerce_saving_price_enable") ); ?>" type="checkbox" value="1" />

" name="get_field_name("acommerce_saving_enable") ); ?>" type="checkbox" value="1" />

" name="get_field_name("acommerce_total_avilable_price_enable") ); ?>" type="checkbox" value="1" />

" name="get_field_name("acommerce_total_sold_enable") ); ?>" type="checkbox" value="1" />

" name="get_field_name("acommerce_count_down_enable") ); ?>" type="checkbox" value="1" />

" />

'product', 'tax_query' => array( array('taxonomy' => 'product_cat', 'field' => 'term_id', 'terms' => $acommerce_woo_category, ) ), 'meta_query' => array( array( 'key' => '_sale_price_dates_to', 'value' => 0, 'compare' => '>', 'type' => 'numeric' ) ), 'order' => $acommerce_product_order, 'posts_per_page' =>$acommerce_number_posts ); $acommerce_query = new WP_Query( $acommerce_acommerce_product_args ); // Main Slider Section echo wp_kses_post( $before_widget ); ?>
style="background-image:url('')" >

have_posts()) { while($acommerce_query->have_posts()) { $acommerce_query->the_post(); //get product id $acommerce_product_id = get_the_ID(); $acommerce_sale_price_dates_to = ( $acommerce_date = get_post_meta( $acommerce_product_id, '_sale_price_dates_to', true ) ) ? date_i18n( 'Y-m-d', $acommerce_date ) : ''; $acommerce_price_sale = get_post_meta( $acommerce_product_id, '_sale_price', true ); $acommerce_date = date_create($acommerce_sale_price_dates_to); $acommerce_new_date = date_format($acommerce_date,"M j,Y g:i:s "); //product stock count $acommerce_limit_stock = get_post_meta( get_the_ID(), '_stock', true ); //package sould count $acommerce_count = get_post_meta(get_the_ID(),'total_sales', true); $acommerce_total_sold = sprintf( '%s', '%s', $acommerce_count, number_format_i18n( $acommerce_count ) ); ?>
'; echo wp_kses_post( woocommerce_template_loop_price() ); echo '
'; ?>

'.esc_html__('Sold : ','acommerce').''; echo esc_html( $acommerce_total_sold ); echo ''; } ?>
class="acommerce-hotoffer-single" >