However, there's no feature to also show the margin there.
There is however a custom information table feature - perhaps that can be useful:
-> For each product you can also set up a custom information table: https://woocommerce-b2b-plugin.com/docs/custom-information-table-in-product-page/ . Here you can enter any information that you want, such as wholesaler margin. You can set up a different information table for each group / category of users - that way, business users can see a different table than retail users.
Hello,
I need on product page a margin calculator.
Exemple :
Your price : 50€
Recommanded public price : 70€
Your margin : 20€ (40%)
Is it possible to do that with BBKing ?
Best
Hi there,
Thank you for getting in touch - I think we replied to your email a short while ago,
As I mentioned there:
-> It's possible to display the retail price to B2B users (this way wholesalers can see both their price, and the retail price for that same product). More info at https://woocommerce-b2b-plugin.com/docs/how-to-display-rrp-recommended-retail-price-to-b2b-users/
However, there's no feature to also show the margin there.
There is however a custom information table feature - perhaps that can be useful:
-> For each product you can also set up a custom information table: https://woocommerce-b2b-plugin.com/docs/custom-information-table-in-product-page/ . Here you can enter any information that you want, such as wholesaler margin. You can set up a different information table for each group / category of users - that way, business users can see a different table than retail users.
Kind regards,
Stefan
Thanks for your answer. I updated the file
public/class-b2bking-public.php
How can i put my updates in my function.php:9238 ?
$wholesale_price = apply_filters('b2bking_filter_wholesale_price', $wholesale_price, $product_id);
$margin=100-round(preg_replace("/([^0-9\\.])/i", "", $wholesale_price)/preg_replace("/([^0-9\\.])/i", "", $retail_price)*100);
$price = '<span class="b2bking_both_prices_text b2bking_retail_price_text">'.$retail_text
.'</span><span class="b2bking_both_prices_price b2bking_retail_price_price">'. $retail_price
.' ( '.$margin.'% de marge )'
. '<br></span><span class="b2bking_both_prices_text b2bking_b2b_price_price">'.$wholesale_text
.'</span><span class="b2bking_both_prices_price b2bking_b2b_price_price b2bking_b2b_price_id_'.esc_attr($product_id).'">'
.$wholesale_price.'</span>';
Hi there,
I believe you can do that by adding this to your functions.php:
Thank you ! It work well !