id ) ? $product->id : 0; } $is_button = ! isset( $button_or_link ) || ! $button_or_link ? get_option( 'yith_woocompare_is_button' ) : $button_or_link; if ( ! isset( $button_text ) || $button_text == 'default' ) { $button_text = get_option( 'yith_woocompare_button_text', __( 'Compare', 'buzzstore' ) ); yit_wpml_register_string( 'Plugins', 'plugin_yit_compare_button_text', $button_text ); $button_text = yit_wpml_string_translate( 'Plugins', 'plugin_yit_compare_button_text', $button_text ); } printf( '
%s
', 'javascript:void(0)', 'compare link-compare' . ( $is_button == 'button' ? ' button' : '' ), $product_id, $button_text ); } remove_action( 'woocommerce_after_shop_loop_item', array( 'YITH_Woocompare_Frontend', 'add_compare_link' ), 20 ); } /** * Product Wishlist Button Function */ if (defined( 'YITH_WCWL' )) { function buzzstore_wishlist_products() { global $product; $url = add_query_arg( 'add_to_wishlist', $product->id ); $id = $product->id; $wishlist_url = YITH_WCWL()->get_wishlist_url(); ?>
loading
get_wishlist_url(); ?>
cart->get_cart_contents_count(), 'buzzstore' ), WC()->cart->get_cart_contents_count() ) ); ?> cart->get_cart_subtotal() ); ?>
'; return $form; } //add_filter( 'get_product_search_form' , 'buzzstore_product_searchform' ); } /** * WooCommerce advance search function area here */ if(!function_exists ('buzzstore_adc_product_search_form')){ function buzzstore_adc_product_search_form(){ $bs_search_placeholder = esc_attr(get_theme_mod('buzzstore_search_options_placeholder','Product Search...')); $args = array( 'number' => '', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => true, ); $product_categories = get_terms( 'product_cat', $args ); $categories_show = ''; $check = ''; if(is_search()){ if(isset($_GET['term']) && $_GET['term']!=''){ $check = $_GET['term']; } } $checked = ''; foreach($product_categories as $category){ if(isset($category->slug)){ if(trim($category->slug) == trim($check)){ $checked = 'selected="selected"'; } $categories_show .= ''; $checked = ''; } } $form = '
'; echo $form; } } /** * Sparkle Tabs Category Products Ajax Function */ /*if ( ! function_exists( 'buzzstore_tabs_ajax_action' ) ) { function buzzstore_tabs_ajax_action() { $cat_slug = $_POST['category_slug']; $product_num = $_POST['product_num']; ob_start(); ?>
    'product', 'tax_query' => array( array( 'taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => $cat_slug )), 'posts_per_page' => $product_number ); $query = new WP_Query($product_args); if($query->have_posts()) { while($query->have_posts()) { $query->the_post(); ?>
is_on_sale() ) : echo apply_filters( 'woocommerce_sale_flash', '
' . __( 'Sale!', 'buzzstore' ) . '
', $post, $product ); ?> '.$product_label_custom.'
'; echo '
'.__('New','buzzstore').'
'; } ?>
*/