Home Forums WC Vendors Free Support vendor is displaying on vendor list page without any product.

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #7001
    sanjay
    Participant

    As i see document and comment vendor is display on list if he have shop name and at least one product but on my vendor list page vendor displaying if he don’t have any product.

    #7002
    sanjay
    Participant

    vendor list link http://www.justforhearts.org/experts/page/5/

    and check the vendor DR ARCHANA CHOPADE

    vendor detail link http://www.justforhearts.org/experts/dr-archana-chopade/
    her you can see the vendor dont have any product after that is displayed on list

    <h1>Note:- do not post site link publicly.</h1>

    #7004
    sanjay
    Participant

    there is bug in new updated version for pagination in file class-wcv-shortcodes.php this file i have replace with old code which was not show pagination for vendor list after updating old code vendor not displaying which dont have any product.

    something wrong on 505 line on bellow code
    $paged_vendors = $vendor_paged_query->get_results();

    #7010
    WC Vendors Support
    Participant

    Thanks, I’ll shoot this to Jamie to take a look at…..

    #7014
    WC Vendors Support
    Participant

    Does the vendor have any hidden products?

    #7015
    sanjay
    Participant

    no that vendor dont have any hidden product the problem in updated code you can check add vendor with old class-wcv-shortcodes.php and with new code so you will realize the actual.but need to sort out asap.

    #7021
    WC Vendors Support
    Participant

    Ok, I’ll create an issue for it and have Jamie take a peek at it. If this turns out to be an actual bug, we’ll have the fix posted here:

    https://github.com/wcvendors/wcvendors/issues/180

    ….if it’s not a bug, and we cant replicate the problem, the issue will be closed.

    Ben

    #7107
    sanjay
    Participant

    Is there any update on this and isconfirmed as bug ?????.

    #7116
    WC Vendors Support
    Participant

    If there’s an update, it’ll be on the GitHub page. We’ll get there, but we have not begun looking at it yet.

    #7208
    sanjay
    Participant

    hi been is there any update?

    #7218
    WC Vendors Support
    Participant

    If there’s an update, it’ll be on the GitHub page. We’ll get there, but we have not begun looking at it yet.

    #7269
    sanjay
    Participant

    hope you will fix asap for your plugin lovers.

    #7297
    sanjay
    Participant

    I have resolved the bug $vendor_total_args['query_id'] replaced with $vendor_paged_args['query_id']

    if ($show_products == 'yes' ) $vendor_paged_args['query_id'] = 'vendors_with_products';

    /**
    * list of vendors
    *
    * @param $atts shortcode attributs
    */
    public function wcv_vendorslist( $atts ) {
    $html = '';

    extract( shortcode_atts( array(
    'orderby' => 'registered',
    'order' => 'ASC',
    'per_page' => '12',
    'columns' => '4',
    'show_products' => 'yes'
    ), $atts ) );
    $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
    $offset = ( $paged - 1 ) * $per_page;
    error_log(print_r($atts, true));
    // Hook into the user query to modify the query to return users that have at least one product
    if ($show_products == 'yes') add_action( 'pre_user_query', array( $this, 'vendors_with_products') );
    // Get all vendors
    $vendor_total_args = array (
    'role' => 'vendor',
    'meta_key' => 'pv_shop_slug',
    'meta_value' => '',
    'meta_compare' => '>',
    'orderby' => $orderby,
    'order' => $order,
    );
    if ($show_products == 'yes') $vendor_total_args['query_id'] = 'vendors_with_products';
    $vendor_query = New WP_User_Query( $vendor_total_args );
    $all_vendors =$vendor_query->get_results();
    // Get the paged vendors
    $vendor_paged_args = array (
    'role' => 'vendor',
    'meta_key' => 'pv_shop_slug',
    'meta_value' => '',
    'meta_compare' => '>',
    'orderby' => $orderby,
    'order' => $order,
    'offset' => $offset,
    'number' => $per_page,
    );
    if ($show_products == 'yes' ) $vendor_paged_args['query_id'] = 'vendors_with_products';
    $vendor_paged_query = New WP_User_Query( $vendor_paged_args );
    $paged_vendors = $vendor_paged_query->get_results();
    // Pagination calcs
    $total_vendors = count($all_vendors);
    $total_vendors_paged = count($paged_vendors);
    $total_pages = intval($total_vendors / $per_page) +1;

    ob_start();
    // Loop through all vendors and output a simple link to their vendor pages
    foreach ($paged_vendors as $vendor) {
    wc_get_template( 'vendor-list.php', array(
    'shop_link' => WCV_Vendors::get_vendor_shop_page($vendor->ID),
    'shop_name' => $vendor->pv_shop_name,
    'vendor_id' => $vendor->ID,
    'shop_description' => $vendor->pv_shop_description,
    ), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/' );
    } // End foreach

    $html .= '<ul class="wcv_vendorslist">' . ob_get_clean() . '';
    if ($total_vendors > $total_vendors_paged) {
    $html .= '<div class="wcv_pagination">';
    $current_page = max( 1, get_query_var('paged') );
    $html .= paginate_links( array(
    'base' => get_pagenum_link(1) . '%_%',
    'format' => 'page/%#%/',
    'current' => $current_page,
    'total' => $total_pages,
    'prev_next' => false,
    'type' => 'list',
    ));
    $html .= '</div>';
    }
    return $html;
    }

    #7327
    Jamie
    Keymaster

    Hello,

    This has been fixed and will be in the next released.

    cheers,

    Jamie.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘WC Vendors Free Support’ is closed to new topics and replies.