Results 1 to 5 of 5

Thread: Bug - Search results shows ALL listings are Featured

  1. #1
    Thread Starter
    joes's Avatar
    Join Date
    Nov 2012
    Location
    Australia
    Posts
    877
    Thanks
    12
    Thanked 358 Times in 261 Posts

    Bug - Search results shows ALL listings are Featured

    There is a BUG in the following code and or how "Charge for Items" is handled:

    File: "vantage\includes\featured.php"

    Code:
    /**
     * Figure out if the listing should be featured or not.
     *
     * @since 1.0.0
     *
     * @return bool True if it should be featured, otherwise false.
     */
    function va_is_listing_featured() {
        global $post;
    
        if ( is_front_page() ) {
            $addons = array( VA_ITEM_FEATURED_HOME );
        } elseif ( is_tax() || is_archive() ) {
            $addons = array( VA_ITEM_FEATURED_CAT );
        } else {
            $addons = array( VA_ITEM_FEATURED_HOME, VA_ITEM_FEATURED_CAT );
        }
    
        foreach ( $addons as $addon_type ) {
    
            $addon = appthemes_get_addon_info( $addon_type );
            $featured = get_post_meta( $post->ID, $addon['flag_key'], true );
    
            if ( ! empty( $featured ) ) {
                return true;
            }
        }
        return false;
    }

    I have tested on both an upgraded data from Vantage 3.0.9 to Vantage 4.1.0 and fresh install of Vantage 4.1.0.

    On doing a "Find" search ALL the listings returned show up as "Featured" when in fact none of the listings are set as featured.

    As per this post: https://forums.appthemes.com/help-us...54/#post407349

    If you have "Charge for Items" set to OFF, any Listing created will be tagged as a "Featured" listing.

    Under this use case, there is NO setting available to be able to turn ON/OFF the featured setting for the Listing.

    Basically there is NO control to the admin to enable or disable the use of the "Featured" functionality.

    The above mentioned code is checking if a listing has a featured flag assigned to it.

    When you have "Charge for Items" set to OFF the function "appthemes_get_addon_info()" is not configured properly and does not return valid results within this code. Hence the function "va_is_listing_featured()" always returns "true" and ALL the listings are always displayed as "Featured".

    Can you please pass onto AppTheme developers to have a look over it.


  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,700
    Thanks
    166
    Thanked 3,390 Times in 3,261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,700
    Thanks
    166
    Thanked 3,390 Times in 3,261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  4. #4
    Thread Starter
    joes's Avatar
    Join Date
    Nov 2012
    Location
    Australia
    Posts
    877
    Thanks
    12
    Thanked 358 Times in 261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,700
    Thanks
    166
    Thanked 3,390 Times in 3,261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Featured listings on search results
    By dorothy in forum Help Using Vantage (Legacy)
    Replies: 5
    Last Post: March 11th, 2016, 05:58 AM
  2. Replies: 2
    Last Post: March 6th, 2016, 04:08 PM
  3. Filter Search results so featured listings are first
    By aaps in forum Vantage General Discussion (Legacy)
    Replies: 4
    Last Post: June 22nd, 2013, 01:01 PM
  4. Featured listings on search results
    By inexistentman in forum Vantage General Discussion (Legacy)
    Replies: 7
    Last Post: September 4th, 2012, 06:29 AM
  5. Featured listings on search results
    By inexistentman in forum Report Vantage Bugs (Legacy)
    Replies: 5
    Last Post: August 30th, 2012, 06:33 AM