WCMp Core
-
AuthorPosts
-
-
January 19, 2021 at 11:13 PM #114045redilsonParticipant
Hi WCMP team,
There’s an issue on the WCMP > Vendors page. The Products column is incorrect, showing thousands of products for vendors. If you click the link, it no longer takes you to their products. Thanks for the assistance.
-
January 19, 2021 at 11:18 PM #114047redilsonParticipant
This is occurring in the latest version. If I revert to 3.5.15, it goes back to normal.
-
January 20, 2021 at 6:15 PM #114102MVX 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 ); }
Copy -
January 20, 2021 at 11:42 PM #114131redilsonParticipant
Thank you. You can close this if it’ll be fixed in the next update.
-
January 21, 2021 at 8:47 AM #114150MVX Support NinjaKeymaster
Thank you @redilson, based on your confirmation we are marking this thread closed.
Regards,
-
-
AuthorPosts
The topic ‘Issue on Vendor view with latest update’ is closed to new replies.