Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Hooks or filter for product type
- This topic has 2 replies, 3 voices, and was last updated 6 years, 6 months ago by Shhiv Narayan.
- AuthorPosts
- October 11, 2017 at 3:07 pm #14220ManskieGuest
Hi all,
My site now allowing vendor to add product and auction.
But ideally, i would like to disallow my vendor to add auction unless they paid for it.
May i know is there any function that can let me check the user’s attribute before load a new product form.
I am trying to make a SQL query before loading the product form, and i have custom field at user’s table, i want to check whether the vendor can add auction or not before the product form page load. - October 11, 2017 at 4:37 pm #14222WCFM ForumKeymaster
HI,
Thanks for get in touch with us.
Please don’t think about such solutions, SQL query or others. If you have to your own query then why you will use WCFM or any such plugins!!
You can achieve this in two way –
“wcfm_product_types” – this is WCFM product types filter, you can manipulate vendor product list using this.
But there is another more significant way to achieve this –
“wcfm_is_allow_auction” – this is WCFM capability filter for “auction”, you have to return Boolean(true/false) depending upon your condition. If you return “false” then it automatically disable “auction” for that vendor.
Please know me is this works for you or not. If you need any further assistance regarding this feel free to reach me anytime.
Thank You
Shhiv - October 12, 2017 at 4:34 am #14252Shhiv NarayanKeymaster
Just to mention, if you want to do this only for vendors then use this also to detect whether logged in user is vendor or not –
wcfm_is_vendor() – returns Boolean
- AuthorPosts
- The topic ‘Hooks or filter for product type’ is closed to new replies.