WCMp Core
-
AuthorPosts
-
-
June 12, 2021 at 12:32 AM #122988Yoni LewisParticipant
Hi: I am using your plugin and it is great. I would need to know if there is any opton or shotcode, to Show a list of all vendors (the list could include name, logo or avatar, etc.)?
Or how could be added?
Thks! -
June 12, 2021 at 10:51 AM #122997MVX Support NinjaKeymaster
Hi @yonilewis thank you for getting in touch with us .Yes, we have a shortcode that creates a vendor list page [wcmp_vendorslist orderby=”registered” order=”ASC”].
Using this customer can search the vendors , to have an idea you can check our demo page: http://wcmpdemos.com/all-in-one-demo/vendors/
Let us know if you need any further help. -
June 12, 2021 at 5:48 PM #123031Yoni LewisParticipant
Hi: thks a lot for your fast reply. And as for categories, those on left are woocomemrce product categories? Any way to set Vendors categories, related to their areas of interest?
Thks again… -
June 12, 2021 at 6:44 PM #123036MVX Support NinjaKeymaster
yes we can use a shortcode to display the product category added by the vendors
[wcmp_product_category vendor=”” per_page=”12″ columns=”4″ orderby=”title” order=”DESC” category=”” operator=”IN”]
In case we want to add multiple categories , then we separate it by a “ comma “
For better understandings please go through our documentation on shortcodes
https://multivendorx.com/list-of-shortcodes/ -
June 15, 2021 at 1:13 AM #123123Yoni LewisParticipant
Hi: In reply to your post, I would need to know to do this…
– when I enter a woocommerce category, I see the products. I would like to see there the Vendors, organized by category. How to do that?
Thks…
-
June 15, 2021 at 5:00 PM #123152MVX Support NinjaKeymaster
you can set vendor list page with category sorting using [wcmp_vendorslist orderby=”category”]. However, the users still need to select the categories.
Now, if you want to specify the categories for each vendor list page, then you have to do custom code. For this, you need to use this filter : apply_filters(‘wcmp_vendor_list_get_wcmp_vendors_args’, $query, $order_by, $_REQUEST, $atts);
and add your custom code. -
June 15, 2021 at 5:02 PM #123153Raju The Cool GuyKeymaster
Hi, you can use this code in your current active theme functions.php file. Then define “category” attribute with vendor list shortcodecode. See this link: https://prnt.sc/pnxx92
/**** Add category attribute on vendor list shortcode *****/ add_filter('wcmp_vendor_list_get_wcmp_vendors_args', 'wcmp_vendor_list_shortcode_category_attribute' , 10 , 4 ); function wcmp_vendor_list_shortcode_category_attribute( $query, $order_by, $qst, $atts ){ if( empty( $atts ) ) return $query; $block_vendors = wp_list_pluck(wcmp_get_all_blocked_vendors(), 'id'); $include_vendors = array(); $pro_args = array( 'posts_per_page' => -1, 'post_type' => 'product', 'tax_query' => array( array( 'taxonomy' => 'product_cat', 'terms' => array_map('sanitize_title', explode(',',$atts['category'])), 'field' => 'slug', 'operator' => 'IN' ) ) ); $products = get_posts($pro_args); $product_ids = wp_list_pluck($products, 'ID'); foreach ($product_ids as $product_id) { $vendor = get_wcmp_product_vendors($product_id); if ($vendor && !in_array($vendor->id, $block_vendors)) { $include_vendors[] = $vendor->id; } } $query['include'] = $include_vendors; return $query; }
Copy -
June 15, 2021 at 6:16 PM #123161Yoni LewisParticipant
Hi: thks a lot for your fast and perfect reply!!!
🙂 -
June 15, 2021 at 6:41 PM #123163Raju The Cool GuyKeymaster
@Yoni Lewis, we are happy to help you out.
We would love it if you shared your experience by giving us 5/5 review here : https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/#new-post
Seeing glowing reviews from existing customers makes others more comfortable knowing they’ll get the support they need should an issue with our services arise.
-
-
AuthorPosts
The topic ‘Show a list of all vendors’ is closed to new replies.