General Marketplace Discussion (User’s interaction forum)
Resolved
Viewing 2 reply threads
-
AuthorPosts
-
-
January 19, 2021 at 6:38 PM #114005kevajoParticipant
The number of products of the sellers display high number, among all the sellers the number display more than 3000 products yet in reality this is not the case.
Here is the catch -
January 20, 2021 at 6:17 PM #114103MVX Support NinjaKeymaster
Hi,
We have found this issue on our end. will fix on our next update.
kindly follow this link to track the issue – https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/issues/635Please add this code in the function.php of the current active theme :
add_filter( 'wcmp_get_products_ids','Wcmp_minor_bug_temporary_fix', 10 , 3); function Wcmp_minor_bug_temporary_fix($result, $clauses, $id){ global $wpdb; $term_id = get_user_meta($id, '_vendor_term_id', true); $default_clauses = array( 'fields' => $wpdb->prefix.'posts.ID', 'where' => "AND ".$wpdb->prefix."posts.post_status = 'publish' ", 'groupby' => $wpdb->prefix.'posts.ID', 'orderby' => $wpdb->prefix.'posts.post_date DESC', 'limits' => '' ); $clauses = apply_filters( 'wcmp_get_products_ids_clauses_request', wp_parse_args( $clauses, $default_clauses ) ); $fields = isset( $clauses['fields'] ) ? $clauses['fields'] : ''; $where = isset( $clauses['where'] ) ? $clauses['where'] : ''; $groupby = isset( $clauses['groupby'] ) ? $clauses['groupby'] : ''; $orderby = isset( $clauses['orderby'] ) ? $clauses['orderby'] : ''; $limits = isset( $clauses['limits'] ) ? $clauses['limits'] : ''; $sql = "SELECT $fields FROM {$wpdb->prefix}posts LEFT JOIN {$wpdb->prefix}term_relationships ON( {$wpdb->prefix}posts.ID = {$wpdb->prefix}term_relationships.object_id ) LEFT JOIN {$wpdb->prefix}term_taxonomy ON( {$wpdb->prefix}term_relationships.term_taxonomy_id = {$wpdb->prefix}term_taxonomy.term_taxonomy_id ) WHERE 1 = 1 AND( {$wpdb->prefix}term_taxonomy.term_id IN( $term_id ) ) AND {$wpdb->prefix}posts.post_author IN( $id ) AND {$wpdb->prefix}posts.post_type = 'product' $where GROUP BY $groupby ORDER BY $orderby $limits"; return $result = $wpdb->get_results( $sql ); }
CopyRegards,
-
March 22, 2021 at 5:38 PM #117995MVX Support NinjaKeymaster
We have not received any update from you for a long. Hope this ticket is already been resolved.
We are now closing this ticket. Kindly create a new one if you need any further help.
-
-
AuthorPosts
Viewing 2 reply threads
The topic ‘Errors in the number of products from sellers’ is closed to new replies.