function woocommerce_template_loop_price() { global $product; $et_price_before = 'variable' == $product->product_type ? $product->min_variation_regular_price : $product->regular_price; $product_ids_on_sale = et_woocommerce_get_product_on_sale_ids(); if (!in_array(get_the_ID(), array_map('intval', $product_ids_on_sale))) { if ('' != $product->get_price_html()) { ?> <div class="et-price-button"> <span class="et-price-sale"><?php echo $product->get_price_html(); ?> </span> </div> <?php } } else { ?> <div class="et-price-button et-product-on-sale"> <span class="et-price-before"><del><?php echo woocommerce_price($et_price_before); ?> </del></span> <span class="et-price-sale"><?php echo woocommerce_price($product->get_price()); ?> </span> </div> <?php } }
<?php } // 'on' == et_get_option( 'foxy_display_callout', 'on' ) ?> </div> <!-- #section-area --> <?php } // 'on' == et_get_option( 'foxy_display_services', 'on' ) || 'on' == et_get_option( 'foxy_display_callout', 'on' ) ?> <?php if ('on' == et_get_option('foxy_home_products_featured', 'on') && class_exists('woocommerce')) { global $woocommerce; $product_ids_on_sale = et_woocommerce_get_product_on_sale_ids(); $query_args = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => (int) et_get_option('foxy_sale_products_number', 8), 'orderby' => 'date', 'order' => 'DESC', 'meta_query' => array(array('key' => '_visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN'), array('key' => '_featured', 'value' => 'yes'))); $et_featured_products_query = new WP_Query(apply_filters('et_featured_products_args', $query_args)); if ($et_featured_products_query->have_posts()) { ?> <div id="et-product-slider"> <div class="et-carousel-wrapper"> <ul class="clearfix"> <?php while ($et_featured_products_query->have_posts()) { $et_featured_products_query->the_post(); ?> <?php global $post; if (function_exists('get_product')) { $product = get_product($et_featured_products_query->post->ID);