Support » Plugins » Gold Cart Live Search disable description

  • Hi guys,

    As I’ve (also) experience awful support for this plugin in their website, I came here so who can help me with a more general code problem.

    The live search widget is functioning to search for the title and description data for each product, but in my case I want it only to search for the product title.

    Here’s the function that that queries the search:

    function wpsc_gc_start_search_query() {
    global $wp_query, $wpsc_query;
    $product_page_id = wpec_get_the_post_id_by_shortcode('[productspage]');
    $post = get_post( $product_page_id );
    $wp_query = new WP_Query( array( 'pagename' => $post->post_name, 'the_content' => $post->post_content ) );
    add_action( 'pre_get_posts', 'wpsc_gc_live_search_pre_get_posts' );
    wpsc_start_the_query();
    remove_action( 'pre_get_posts', 'wpsc_gc_live_search_pre_get_posts' );
    list( $wp_query, $wpsc_query ) = array( $wpsc_query, $wp_query ); // swap the wpsc_query object
    $GLOBALS['nzshpcrt_activateshpcrt'] = true;
    }

    Is the better to use “get_the_title” or filter the “post_content”?

    Thanks a lot in advance!

    Regards,

    Andre

  • The topic ‘Gold Cart Live Search disable description’ is closed to new replies.