WordPress template_include filter not working properly

Ok i done by my own.

I delete all above code and write this code. It works perfectly for me

Code:

function template_chooser($template){
    global $wp_query;
    $plugindir = dirname(__FILE__);

    $post_type = get_query_var('post_type');

    if( $post_type == 'product' ){
        return $plugindir . '/themefiles/single-product.php';
    }

    if (is_tax('prodcategories')) {
        return $plugindir . '/themefiles/taxonomy-prodcategories.php';
    }

    return $template;   
}
add_filter('template_include', 'template_chooser');