将woocommerce产品限制为某些客户购买 [英] Restrict woocommerce product to certain customer to buy

查看:273
本文介绍了将woocommerce产品限制为某些客户购买的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个销售家庭用品的电子商务网站.我希望某些商品可以由常规访问者购买,但是有些产品(具有很多折扣)仅适用于某些会员制(即批发商),并且这些产品会向所有访问者显示,但是当常规访问者单击添加到购物车"时, ,它将重定向至带有以下注释的会员注册表:仅批发会员可以购买此产品. 我正在使用WPML构建woocomerce多语言网站. 请建议我应在该项目中使用的代码或插件.

I am setting up an eCommerce website selling household's stuff. I'd like some products to be purchased by regular visitors but some products (with lots of discounts) are retricted to certain Memberships only (namely wholesalers) and these products shows to every visitors but when a regular visitor clicks on "add to cart", it will re-direct to a membership registeration form with a note: Only wholesale member are allowed to purchase this item. I am building a woocomerce multilingual website using WPML. Please suggest codes or plugin that I should use for this project.

非常感谢您.

推荐答案

我今天必须找到解决方案,恕我直言,最好的方法是使用此插件: https://wordpress.org/plugins/product-visibility -按用户角色进行woocommerce/

I had to find solution today and best way imho is to use this plugin: https://wordpress.org/plugins/product-visibility-by-user-role-for-woocommerce/

唯一的缺点是,免费版本是完全手动的(所有产品不能一次批量更改).但是您可以阻止购买该产品,将其完全隐藏以及其他一些设置.

Only downside, free version is fully manual (no batch changing for all products at once). But you can block buying of that product, hide it completely and some other settings.

我使用了 https://wordpress.org/plugins/user-role-editor/用于创建用户类别. (与其他答案一样)

I used https://wordpress.org/plugins/user-role-editor/ for creating user category. (as in the other answer)

这篇关于将woocommerce产品限制为某些客户购买的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆