Okay
  Public Ticket #2619543
custom pages and menu
Closed

Comments

  • Roberto Marseglia started the conversation

    Hi, i have some questions (almost similar topics):

    - can i make customized pages restricted for Logged in?

    - can i make them according to Rule / Group?

    - can i filter also Menu Items according to above?

    - while B2B users enter my site to buy my products, can i give access to end-users B2C a Subscription, for example for a Cloud service rental? 

    I just purchased B2Bking and finally removed tons of plugins for all my sale policy...but i would to create my customers reserved areas entirely by B2Bking.

    Thanks for any help.

  •  2,218
    WebWizards replied

    Hello Roberto,

    Thank you for purchasing our plugin,

    Where restricting pages directly is not a plugin feature, the plugin does have a Content Restriction shortcode that could help: https://woocommerce-b2b-plugin.com/docs/shortcode-to-restrict-content-to-b2b-b2c-user-groups-specific-users/

    For example you could set up a page like this:

    [b2bking_content show_to=b2b]Premium content for all b2b users here...[/b2bking_content]

    [b2bking_content show_to=234,677]Premium content for groups 234 and 677 here...[/b2bking_content]

    [b2bking_content show_to=loggedout]Please log in to be able to view this content...[/b2bking_content]

    The only way to filter menu items with the plugin would be to hide or show them with CSS (also explained in the article linked above)


    - while B2B users enter my site to buy my products, can i give access to end-users B2C a Subscription, for example for a Cloud service rental? 

    I am not sure if I fully understand. Do you mean have the users pay to unlock content? 

    The plugin doesn't have any subscription feature directly. But you could restrict content with the shortcode above for only 1 group. And the user can pay, and after you receive payment, you move the user to the premium group.


    Does that help?

    Kind Regards,

    Stefan

  •   Roberto Marseglia replied privately
  •  2,218
    WebWizards replied

    Hi Roberto,


    1. Before all: i have in catalogue both Stock Products and Service Products categories.

    2. B2C must not have any access to Stock Products, but must see Service Products, and buy them (i should use a 3rd part Woocommerce Subscription Plugin)


    For this, you should use the PRODUCT VISIBILITY functionality, not dynamic rules (dynamic rules can hide only price, not products). 

    How to use product visibility is detailed in this link, but feel free to follow up with any questions as well:

    https://woocommerce-b2b-plugin.com/docs/faq-product-visibility-is-not-working-how-to-set-up-product-visibility/

    Yes, I would suggest grouping items in categories, and then setting product visibility per category.



    PS customized contents will be published by own-made PHP template pages, can you provide B2Bking functions to check Rules, instead of Shortcodes?

    If you would like to show or hide content by b2bking group / b2b / b2c, using PHP directly, please see the following code:

    // FOR B2B USERS ONLY
    if (get_user_meta(get_current_user_id(), 'b2bking_b2buser', true) === 'yes'){
     // content here
    }
    // FOR B2C USERS ONLY
    if (get_user_meta(get_current_user_id(), 'b2bking_b2buser', true) !== 'yes'){
     // content here
    }
    // FOR USERS IN B2BKING GROUP WITH ID 18
    $user_is_b2b = get_user_meta(get_current_user_id(), 'b2bking_b2buser', true);
    $user_group = get_user_meta(get_current_user_id(), 'b2bking_customergroup', true);
    if ($user_is_b2b === 'yes' && intval($user_group) === 18){
     // content here
    }
    


    Kind Regards,

    Stefan