';
return $form;
}
add_filter( 'get_product_search_form' , 'buzzstore_product_searchform' );
}
/**
** WooCommerce Advance Search 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,
'include' => array()
);
$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;
}
}
/**
** WooCommerce Section Start Here
**/
if ( ! function_exists( 'is_woocommerce_activated' ) ) {
function is_woocommerce_activated() {
if ( class_exists( 'woocommerce' ) ) { return true; } else { return false; }
}
}
/**
** WooCommerce Section Start Here
**/
if (is_woocommerce_activated()) {
if ( ! function_exists( 'buzzstore_quick_view_cart_item' ) ) {
function buzzstore_quick_view_cart_item() {
//Check if WooCommerce is active and add a new item to a menu assigned to Primary Navigation Menu location
if ( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ))
ob_start();
global $woocommerce;
$viewing_cart = __('View your shopping cart', 'buzzstore');
$cart_url = $woocommerce->cart->get_cart_url();
$shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) );
$cart_contents_count = $woocommerce->cart->cart_contents_count;
$cart_contents = sprintf(_n('%d ITEM(S) - ', '%d ITEM(S) - ', $cart_contents_count, 'buzzstore'), $cart_contents_count);
$cart_total = $woocommerce->cart->get_cart_total();
if ($cart_contents_count == 0) {
$menu_item = '