WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Ajax issue and custom role rights (19 posts)

  1. neoseeyou
    Member
    Posted 1 year ago #

    Hello everybody

    Let me explain my little issue with woocommerce.

    Well i use a plugin call wp-client to create for each customer a private area, so this plugin uses a custom registration form to create it automaticly. It give also a custom role call "wp-client" for each user.

    Ok so if a user want to buy something first he is not able to access the checkout because he needs to create an free account using the custom form .

    All is working except that after the new "wp client" access the checkout of woocommerce the ajax function load continualy, like the wp client role is not allow . I try with an admin role and it's work. I download a plugin call user role editor giving full rights to the "wpclient" role but it's still no working. I disable easy wp seo as well but still an issue.

    Any help please

    http://wordpress.org/extend/plugins/woocommerce/

  2. neoseeyou
    Member
    Posted 1 year ago #

    In thanking you for your attention to this matter

  3. micronda
    Member
    Posted 1 year ago #

    Hi neoseeyou ! Did you finally resolve this problem? I have exactly the same problem and am not sure how to go about it....

  4. neoseeyou
    Member
    Posted 1 year ago #

    Hello micronda.

    If you are in the exact same case, here is what i did to solve it :

    - go to settings of the wp-client module
    - in general > and select "no" to this option "Hide dashboard/backend from clients and client staff"

    This way and i don't know exactly why, the woocommerce or jigoshop ecommerce module work. It's often a permission problem

    Tell me if it's solve your problem too

  5. micronda
    Member
    Posted 1 year ago #

    WOW !!!! Yes it did... It would be interesting to know why...

    By the way, did you encounter any other problems with the WP-Client - Woocommerce integration? Or any extra advice ?

    Thanks a lot for your help !!

  6. neoseeyou
    Member
    Posted 1 year ago #

    U welcome ;-)

    well first of all always check if there is new releases, for now it's the 3.0.3

    No other big issues with woocommerce. This plugin is really great but the support (even if it always answer to your tickets) is not very technical. I spend nearly 3 months on it for a project and this plugin has improved with the time.

    I report some bugs/modifications and hope it will be include in futur releases. For example the email address of a user who registrered.

    Actually the plugin send to the admin an email to tell that a new user is registered (if you allow users to register by thermselve) but it give you just the username of the use, it's not possible to include the user's email.

  7. neoseeyou
    Member
    Posted 1 year ago #

    One thing you should notice about using both plugins is you must use the custom registration form of the wp client to create an account before access to the checkout of woo commerce.

    Otherwise if you create a new account with woocommerce during the checkout process, wp-client will not recognize this user as a wp-client and will not create the specific hub for this account ;-)

  8. micronda
    Member
    Posted 1 year ago #

    Thanks for this observation !

    In our case there is a small manual process (after purchase), where we assign the service to the customer, so at that moment we use the "convert" option in WP-Client. I've been testing this way of doing it and it works OK, for now..... :-)

    The only downturn, which i have asked wp client support about is that WP Client is using the "First Name" field as the company name, and this isn't good, I need it to use the woocommerce "Company Field". This value is important as you can't change once it's assigned in wp client....

  9. neoseeyou
    Member
    Posted 1 year ago #

    well my client need to be automatic , so yes it is possible the way you mentionned too for manual process ;-)

    i understand, but my knowledges as a dev are not enaugh to help you on this ;-) I think you could ask them a estimate for this job

  10. micronda
    Member
    Posted 1 year ago #

    I'll try and get them to set up an option inside the plugin..... Although that could be difficult... :-)

    I found the code that I think is the culprit (inside clients_convert.php) =>

    $first_name = get_user_meta( $user_id, 'first_name', true );
    
                            if ( !$first_name ) {
    
                                $first_name = $user_object->get('user_login');
    
                                update_user_meta( $user_id, 'first_name', $first_name );
    
                            }

    But wouldn't know how to change it without breaking it :-D

  11. micronda
    Member
    Posted 1 year ago #

    Having a look at the database, I would say that I just need to change the code to:

    $first_name = get_user_meta( $user_id, 'billing_company', true );
    
                            if ( !$first_name ) {
    
                                $first_name = $user_object->get('user_login');
    
                                update_user_meta( $user_id, 'billing_company', $first_name );
    
                            }

    But I'm going to wait to see what wp client support says...

  12. hgrat
    Member
    Posted 1 year ago #

    I'm no good at coding but do you think it's possible to register a customer with the delivery info when they purchase a product?

    I would like to integrate woocommerce and Wp-client so the customer have to do as little as possible.

  13. micronda
    Member
    Posted 1 year ago #

    Hi hgrat. Yes, that's how I'm doing it. But after the purchase I manually convert the user to the wp client role (keeping the woocommerce role at the same time).

    By the way the wp client team did implement the possibility of selecting which user meta to use when converting the user, so now you can select the 'billing_company' the client introduced in woocommerce when registering as the wp client company name !!

  14. neoseeyou
    Member
    Posted 1 year ago #

    Hi Hgrat and micronda, well for me i use a different way. I force the user to create an account with the custom form of wp client to be able to go to the checkout process. I disable in woocommerce options the possibility to create a account. THis way all is automatic, no need to convert an user in the back office. So at the end it's all depend of what you wants ;-)

    Micronda < it's a good point! i hope they will make the changes i have asked for my client because it's not always easy to share documents for his own customers (Fitness coach activity). When a document is load for a client (let say a picture), the system send an email to the customer, but if you want to assign this same document to another customer (and keep this document assign to the old one), it will not send an email notification for the new user exclusively. If you want to warn the new user for the document you have the obligation to warn again the first customer (sorry english is not my native language ;))

  15. nmbdeveloper
    Member
    Posted 1 year ago #

    Hi neoseeyou. Thanks for you all of your great input. I am working with woocommerce and wp-client as well. When you say that you "Force the user to create an account with the custom form of WP Client to be able to go to the checkout process." Can you please explain how you force them to do this? Also, where do you create the custom form in wp-client and how do you make sure the account is created before Woocommerce checkout.

    Your help is much appreciated.

  16. neoseeyou
    Member
    Posted 1 year ago #

    Hi nmbdev, well let me explain:

    By forcing i mean in woocommerce options , i uncheck all the 'register options'.This way woocommerce is not allow to create an account, so if a visitor want to go to the checkout page (after the cart page), woocommerce tell him that he can't finish his order because he is not registered.

    At this point i add the custom registration form of wp client inside form-checkout.php file in woocommerce < templates < checkout

    // If checkout registration is disabled and not logged in, the user cannot checkout
    if ( ! $checkout->enable_signup && ! $checkout->enable_guest_checkout && ! is_user_logged_in() ) {
    echo apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'Vous devez être connecter pour commander ou utiliser le formulaire suivant pour créer un compte.', 'woocommerce' ) );
    echo do_shortcode('[wpc_client_registration_form]');
    return;
    }

    I didn't created a function but if someone do it , it's the best way for futur releases.

    So this way the visitor create his wp-client account, then he still have to connect to his account to go to checkout page of woocommerce ;-)

    To edit the form of wp client, go to wp-client options < templates < shortcodes templates < then client registration

  17. nmbdeveloper
    Member
    Posted 1 year ago #

    neoseeyou. Thanks for the tips. I am able to make all of these changes, but when I try to checkout in woocommerce I am not required to create an account, the order is approved and received without any sign of creating an account. Am I missing something. Thanks again for your insight.

  18. neoseeyou
    Member
    Posted 1 year ago #

    on woocommerce settings you have an option to enable or disable a visitor to buy with no need to be registered

  19. hgrat
    Member
    Posted 1 year ago #

    Thank you for the tip! I'll try and see if I can make it work too.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic