WebWizards
Forum Replies Created
-
Thank you for getting in touch,
By calculate discount, do you mean through B2BKing’s dynamic rules for ‘discount percentage’ and ‘discount amount’?
You can have a discount be calculated from regular price, by checking this box in the dynamic rule configuration: https://prnt.sc/12xj2dz
Kind regards,
StefanThis is the relevant code and the hooks our plugin applies:
This code is found in class-b2bking-public.phpadd_filter('woocommerce_product_get_price', array($this, 'b2bking_individual_pricing_fixed_price'), 999, 2 ); add_filter('woocommerce_product_get_regular_price', array($this, 'b2bking_individual_pricing_fixed_price'), 999, 2 ); // Variations add_filter('woocommerce_product_variation_get_regular_price', array($this, 'b2bking_individual_pricing_fixed_price'), 999, 2 ); add_filter('woocommerce_product_variation_get_price', array($this, 'b2bking_individual_pricing_fixed_price'), 999, 2 ); add_filter( 'woocommerce_variation_prices_price', array($this, 'b2bking_individual_pricing_fixed_price'), 999, 2 ); add_filter( 'woocommerce_variation_prices_regular_price', array($this, 'b2bking_individual_pricing_fixed_price'), 999, 2 ); // Set sale price as well add_filter( 'woocommerce_product_get_sale_price', array($this, 'b2bking_individual_pricing_discount_sale_price'), 999, 2 ); add_filter( 'woocommerce_product_variation_get_sale_price', array($this, 'b2bking_individual_pricing_discount_sale_price'), 999, 2 ); add_filter( 'woocommerce_variation_prices_price', array($this, 'b2bking_individual_pricing_discount_sale_price'), 999, 2 ); add_filter( 'woocommerce_variation_prices_sale_price', array($this, 'b2bking_individual_pricing_discount_sale_price'), 999, 2 ); // display html // Displayed formatted regular price + sale price add_filter( 'woocommerce_get_price_html', array($this, 'b2bking_individual_pricing_discount_display_dynamic_price'), 999, 2 ); // Set sale price in Cart add_action( 'woocommerce_before_calculate_totals', array($this, 'b2bking_individual_pricing_discount_display_dynamic_price_in_cart'), 999, 1 ); // Function to make this work for MiniCart as well add_filter('woocommerce_cart_item_price',array($this, 'b2bking_individual_pricing_discount_display_dynamic_price_in_cart_item'),999,3);
- This reply was modified 3 years, 6 months ago by WebWizards. Reason: formatting
Hi Rajesh,
I could use some more details to understand this.
Are you saying that you need to have B2B price for the product, but also want to set the price to 0 if certain conditions are met? But the issue is that B2BKing forces the B2B price, and your code to set the price to 0 is not working?
Did I understand that correctly?
I can give you a list of what hooks our plugin uses if that helps (so you can use those hooks to return the 0 price), but it would involve some work in setting that up.
I wonder if it would be easier to simply use B2BKing’s Dynamic Rules for discounts to give a 100% discount
Kind regards,
StefanHi there,
I think the issue may be that you have users that are assigned that particular role. Please make sure no users are assigned the role. That may be enough to fix it.
If that is not sufficient, you may need a role editor plugin such as https://www.ads-software.com/plugins/user-role-editor/
Glad to hear you found the issue! Thanks for letting us know.
Hi there,
I tested in a clean installation with the latest version of the Lite plugin. I did not see a 404 error, instead I am seeing “Error: Your account is waiting for approval. Until approved, you cannot login.” as expected.
I believe there is some issue in your site. Try to disable all other plugins except WooCommerce and B2BKing.
My understanding is that you are talking about the lite version. If you have purchased the premium version, please use our support platform at https://webwizards.ticksy.com
Hi Karan,
You can do it with this PHP code snippet:
if (get_user_meta(get_current_user_id(),'b2bking_b2buser', true) === 'yes'){ function disable_coupon_field_on_cart( $enabled ) { return false; } add_filter( 'woocommerce_coupons_enabled', 'disable_coupon_field_on_cart' ); }
To add a snippet please see: https://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/
Kind regards,
Stefan- This reply was modified 3 years, 7 months ago by WebWizards.
Hi Paul,
We’re the B2BKing developers – not sure if this is related to your issue, but you should know that B2BKing also controls shipping methods. If you cannot find shipping methods, make sure they are enabled under B2BKing->Groups for each group/b2c/logged out users.
Kind regards,
StefanThank you for the reply – I appreciate it
I behaves a little odd though. I have done the following test a number of times and it always happens like this:
1) I have a user with the role customer who DOES NOT appear in WooCommerce->Customers
The user has never placed any order.
2) I go to the User’s profile page and without making any chance I simply click “Update User”.
I refresh the WooCommerce customers page and now the user is there.
I suppose clicking “Update User” updates those analytics tables you mentioned, right?
Thank you for getting in touch,
The plugin doesn’t have any functionality for stock by user or group. Perhaps it’s something to look at for future updates – thanks for the feedback.
Kind regards,
StefanHi there,
If I understand correctly, you are using a custom .php email template which is not loading, correct?
The custom email template should not be in /woocommerce/
The location our plugin uses is directly in the theme folder (e.g.: it should be in wp-content/themes/storefront/your-template.php)
Hope that helps,
Kind regards,
StefanThank you for getting in touch Harry,
The plugin uses the Europa.eu API, so it will no longer support automatic checks for GB numbers.
We’d like to add it in a future release, but it’s not something we can work on very soon.
If you would like to implement it yourself, you can do so if the UK tool has an API that can be used. In our plugin simply search for the keyword “SoapClient” throughout the code, and you will find 2 or 3 places where VIES validation runs. You would have to add some extra logic checks there for the case where country == GB
If you do end up implementing that, please do share the code with us. We’d love to have this in our plugin and it would be helpful to many customers.
Kind regards,
StefanHi there,
Thank you for using our plugin,The registration shortcodes are available only in the plugin’s premium version, which can be obtained from CodeCanyon: https://codecanyon.net/item/b2bking-the-ultimate-woocommerce-b2b-plugin/26689576
The Lite version here has the features listed here https://www.ads-software.com/plugins/b2bking-wholesale-for-woocommerce/ under “Features List (free version)”.
Let me know if I can help with anything,
Kind Regards,
StefanHi Shamser,
Thank you for using our plugin,Minimum quantity/value rules are available only in the premium version of the plugin.
The next links contain information on how those could be set up with our plugin:
Documentation: https://woocommerce-b2b-plugin.com/docs/how-to-set-different-minimum-order-thresholds-for-different-users-in-woocommerce/
Blog: https://woocommerce-b2b-plugin.com/woocommerce-minimum-order-quantity-and-amount/
If I can help with anything, let me know,
Kind Regards,
StefanHello Sebastian,
Thank you for getting in touch and for your suggestion,That definitely makes sense. We will look at making an improvement here in future updates.
Thanks again,
Stefan