I would like to separete view of category menu for b2b and b2c clients.
So i decided to create specific page with diffrent sidebar wiget with category menu fo b2b clients, but last puzzel i need to do so is restric access for b2c clients to this b2b site. How can na achive this?
You would need to replace 1234 with the ID of your page. To get the page ID you can edit the page, and the number in the URL is the ID (if the URL says "?post=123", the ID is 123)
Let me know if I can help with anything, or if you have any questions,
Glad to hear you found that article. Right, you can use either the visibility shortcode, or the Body classes to hide items for b2b / b2c / specific groups, etc.
I would like to separete view of category menu for b2b and b2c clients.
So i decided to create specific page with diffrent sidebar wiget with category menu fo b2b clients, but last puzzel i need to do so is restric access for b2c clients to this b2b site. How can na achive this?
Hi there,
Thank you for purchasing our plugin,
My suggestion is: If the user is B2C and they are trying to view the B2B page, you can redirect them to another page.
You can do that with this code snippet:
This snippet can be added to functions.php, or by following our guide here: https://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/
You would need to replace 1234 with the ID of your page. To get the page ID you can edit the page, and the number in the URL is the ID (if the URL says "?post=123", the ID is 123)
Let me know if I can help with anything, or if you have any questions,
Kind regards,
Stefan
Thanks for this , i will use it.
But now i'm thinking that this concept isn't enough,
my product category menu is different for B2B and B2C, ( first half of product categories menu is for B2B and the second half is for B2C),
If i redirect B2C customer from B2B webiste, all other woocommerce sites still contain Product Categories Menu for both (b2b and b2c).
I would like to find a way to implement something like ( if logged user = b2c ) css .ProductCategoriesMenu (visibility: hidden).
Thanks again for help,
Plugin is fantastic i'm glad that i decided to buy it.
UPDATE:
i found this:
https://woocommerce-b2b-plugin.com/docs/shortcode-to-restrict-content-to-b2b-b2c-user-groups-specific-users/
Thank you for the kind words,
Glad to hear you found that article. Right, you can use either the visibility shortcode, or the Body classes to hide items for b2b / b2c / specific groups, etc.
Let me know if there's anything I can help with,