توضیحات
Simple Role Based Pricing is a lightweight and flexible WooCommerce plugin that allows you to set custom prices or discounts for products based on user roles. Configure global pricing rules, restrict discounts to specific product categories, apply bulk actions, or set role-specific prices per product with Quick Edit support. The plugin ensures robust pricing logic with category-based restrictions and detailed debug logging for troubleshooting.
Key Features
- Role-Based Pricing: Set fixed prices, percentage discounts, or fixed-amount discounts for specific user roles.
- Category Restrictions: Apply discounts only to products in selected categories (e.g., “storage”).
- Global Rules: Define pricing rules for all products or specific categories in WooCommerce Settings.
- Bulk Editing: Adjust prices for multiple products at once.
- Quick Edit Support: Set role-based prices directly from the product list.
- Flexible Compatibility: Works with simple and variable WooCommerce products.
- Debug Logging: Detailed logs for troubleshooting pricing issues, including category matching.
Use Cases
- Offer exclusive discounts to VIP customers or wholesalers.
- Restrict discounts to specific product categories for certain roles.
- Create role-specific pricing for B2B or B2C customers.
Compatibility
- WooCommerce: Required (version 4.0 or higher recommended).
- User Role Editor: Optional, for managing custom user roles.
- Other Role Management Plugins: Compatible with plugins that add custom roles to WordPress.
- Themes: Tested with popular themes like Twenty Twenty-Five and Astra.
Configuration
- Global Rules:
- Navigate to WooCommerce > Settings > Role Based Pricing.
- Select a user role (e.g., Administrator, Customer).
- Choose whether to apply pricing to All Products or Specific Categories.
- Set the discount type (Percentage, Fixed Amount, or Fixed Price) and value.
- Save changes to apply the rules site-wide.
- Category Restrictions:
- Select Specific Categories and choose the desired product categories (e.g., “storage”).
- Only products in these categories will receive the discount for the specified role.
- Per-Product Pricing:
- Edit a product and use the Quick Edit option to set role-specific prices.
- Alternatively, configure prices in the product’s Role Based Pricing settings.
Debugging
- The plugin includes detailed debug logging to troubleshoot pricing issues.
- Logs are stored in
/wp-content/uploads/simple-role-based-pricing/simproba-debug.log
. - To view logs:
`bash
tail -n 200 /var/www/html/wordpress/wp-content/uploads/simple-role-based-pricing/simproba-debug.log“`
نصب
- Upload the
simple-role-based-pricing
folder to/wp-content/plugins/
. - Activate the plugin through the Plugins menu in WordPress.
- Go to WooCommerce > Settings > Role Based Pricing to configure global pricing rules.
- Optionally, edit individual products to set role-specific prices via Quick Edit or the product settings.
نقد و بررسیها
نقد و بررسیای برای این افزونه یافت نشد.
توسعه دهندگان و همکاران
“Simple Role Based Pricing” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کردهاند.
مشارکت کنندگانترجمه “Simple Role Based Pricing” به زبان شما.
علاقه مند به توسعه هستید؟
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.