• Resolved joalmoore

    (@joalmoore)


    Hi,

    I have read through topics here and also through documentation articles about setting up the Sign In option found on the Post A Job page. I read the article suggesting the use of WooCommerce but I am confused on how this option is supposed to work well. I added the suggested woocommerce short code to a page (Log In / Register) on my site. I tested what will be seen once logged in and there is a disconnect between using WooCommerce and seeing WPJM Job Dashboard. When I am logged in using the WooCommerce suggestion what I see is the typical WooCommerce page that shows orders, acct details, etc, which of course makes sense seeing as though that is what the plugin is supposed to be used for. How do I use WooCommerce to only create the accounts but then send users to the WPJM dashboard once logged in? This WooCommerce option seems to be disjointed.

    • This topic was modified 5 years, 1 month ago by joalmoore.
Viewing 15 replies - 1 through 15 (of 24 total)
  • @joalmoore

    You need to assing the page with the jobs shortcode inside the settings of WPJM
    If this does not show up in the my account section of woocommerce, you need to define a custom endpoint for woocommerce.
    Just give a shout if you need this custom code

    Thread Starter joalmoore

    (@joalmoore)

    Hi, thanks for responding. I make sure what you suggested is set and post back.

    Thread Starter joalmoore

    (@joalmoore)

    I’m back already. In the Woocommerce settings I set the My Account page to be the Job Dashboard page from WPJM. This does not work. After logging in the Woocommerce account page is what shows. This wouldn’t be that big of a problem I guess if I knew what to do to edit the Woocommerce account page to show only what I want it to show. Is there a way to do that? For instance the Orders tab. I don’t need that because there are no orders to manage.

    @braehler

    Just give a shout if you need this custom code

    I would be interested in this! Sounds like there is maybe a better way to integrate WP Job Manager and WooCommerce than I am aware of?

    After logging in the Woocommerce account page is what shows. This wouldn’t be that big of a problem I guess if I knew what to do to edit the Woocommerce account page to show only what I want it to show. Is there a way to do that?

    @joalmoore – I’ve been using the Ultimate Member plugin for user account management with WP Job Manager, and it has been great; it doesn’t really integrate any more with WP Job Manager than WooCommerce does for account management, but it has a lot more built-in features for user account management than WooCommerce does.

    I’m now using WooCommerce for payment/order processing for job posts, and I’ve integrated them just by putting the [woocommerce_my_account] and [job_dashboard] shortcodes on the page that the user goes to when they log-in (with a link to the job post submission form).

    Then I just hid the elements of the WooCommerce dashboard that I didn’t want (everything basically, since I’m using Ultimate Member for account management–see CSS code below), and added links on the page the user goes to when they log-in to the WooCommerce pages that I want users to have access to.

    .woocommerce-account .woocommerce-MyAccount-navigation {display:none;} 
    .woocommerce-account .woocommerce-MyAccount-content {float:left; width: 100%;}

    Instead of hiding the whole WooCommerce My Account navigation section, you can also just hide individual links, like the Orders tab with this CSS: .woocommerce-MyAccount-navigation-link--orders {display:none;}

    Hope this is helpful!

    @hastibe @joalmoore

    so this is the way to add a csutom endpoint to woocommerce:

    // SET NEW ENDPOINT FOR WPJM Dashboard IN MY ACCOUNT
    
    function wpjm_endpoint() {
    
        add_rewrite_endpoint( 'wpjm', EP_ROOT | EP_PAGES );
    
    }
    
    add_action( 'init', 'wpjm_endpoint' );
    
     
    
    // ------------------
    
    // 2. Add new query var
    
    function wpjm_query_vars( $vars ) {
    
        $vars[] = 'wpjm';
    
        return $vars;
    
    }
    
    add_filter( 'query_vars', 'wpjm_query_vars', 0 );
    
     
    
    // ------------------
    
    // 3. Insert the new endpoint into the My Account menu
    
    function wpjm_link_my_account( $items ) {
    
        $items['wpjm'] = 'wpjm';
    
        return $items;
    
    }
    
    add_filter( 'woocommerce_account_menu_items', 'wpjm_link_my_account' );
    
     
    
    // ------------------
    
    // 4. Add content to the new endpoint
    
    function wpjm_content() {
    
    echo do_shortcode( ' [job_dashboard] ' );
    
    }
    
    add_action( 'woocommerce_account_wpjm_endpoint', 'wpjm_content' );

    replace “wpjm” with your function namme/ the name of the page you want to assing. No 3 gives you the chance to name the page like you want, for example “listings”

    this will insert the endpoint at the last place in the account. to change the sorting of them use this code

    function my_account_order() {
    	$myorder = array(
    		'dashboard'          	=> __( 'Konto', 'woocommerce' ),
    		'edit-account'       	=> __( 'Daten', 'woocommerce' ),
    		'orders'            	=> __( 'Rechnungen', 'woocommerce' ),
    		'wpjm' 					=> __( 'WPJM output', 'woocommerce' ),
    		
    		'customer-logout'    	=> __( 'Abmelden', 'woocommerce' ),
    	);
    	return $myorder;
    }
    add_filter ( 'woocommerce_account_menu_items', 'my_account_order' );

    hope this will help you guys

    Hi, I am new here and I try to put the {job-dashboard} into the my account navigation. @Brahler did a very good job in explaining this problem and it works great… except one little thing….
    Everything looks great but when I move over a job listing and press one of the options, i.e. continue_job_id, nothing happens. When I enter the job dashboard directly ( outside of the my account page) everything works fine.
    I hope you can help me with this. Thx for your great work so far. (Vielen dank)
    Henri

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi @avjobs13wpacc

    i can’t help with custom code, but maybe @braehler can chime in?

    @avjobs13wpacc
    Just try the second code only, which I mentionend aabove. First remove or commment the lines of the first code out.
    The just insert the endpoints via the second code.
    Make sure to resave your permalinks. For some reason, the code is absolutely correct, but as far as I can remember there is some problem with an ajax load in it, which was discussed on an older topic which I opend in woocommerce, but there is no “solution”

    • This reply was modified 5 years, 1 month ago by braehler.

    Hi @braehler,
    Thx for your help. Sorry for my misunderstandings. You talk about the second code… do you mean this one?

    // 2. Add new query var
    function wpjm_query_vars( $vars ) {

    $vars[] = ‘wpjm’;

    return $vars;
    }
    add_filter( ‘query_vars’, ‘wpjm_query_vars’, 0 );
    // ——————

    or do you mean these?

    function my_account_order() {
    $myorder = array(
    ‘dashboard’ => __( ‘Konto’, ‘woocommerce’ ),
    ‘edit-account’ => __( ‘Daten’, ‘woocommerce’ ),
    ‘orders’ => __( ‘Rechnungen’, ‘woocommerce’ ),
    ‘wpjm’ => __( ‘WPJM output’, ‘woocommerce’ ),

    ‘customer-logout’ => __( ‘Abmelden’, ‘woocommerce’ ),
    );
    return $myorder;
    }
    add_filter ( ‘woocommerce_account_menu_items’, ‘my_account_order’ );

    @avjobs13wpacc

    remove all of the code `// 2. Add new query var
    function wpjm_query_vars( $vars ) {

    $vars[] = ‘wpjm’;

    return $vars;
    }
    add_filter( ‘query_vars’, ‘wpjm_query_vars’, 0 );`
    then just use this code only `function my_account_order() {
    $myorder = array(
    ‘dashboard’ => __( ‘Konto’, ‘woocommerce’ ),
    ‘edit-account’ => __( ‘Daten’, ‘woocommerce’ ),
    ‘orders’ => __( ‘Rechnungen’, ‘woocommerce’ ),
    ‘wpjm’ => __( ‘WPJM output’, ‘woocommerce’ ),

    ‘customer-logout’ => __( ‘Abmelden’, ‘woocommerce’ ),
    );
    return $myorder;
    }
    add_filter ( ‘woocommerce_account_menu_items’, ‘my_account_order’ );`

    resave your permalinks and it should work

    Hi @braehler,

    Danke vielmals fur Ihre hilfe.

    Henri

    @avjobs13wpacc
    kein Problem, hatten selber genug damit zu k?mpfen ??

    Thread Starter joalmoore

    (@joalmoore)

    @hastibe I’m late responding but Ultimate Member did exactly what I wanted for now. Thanks for recommending the plugin to me!

    Hi @braehler,
    After several try outs it is still not working properly. I started over again and again…
    Do you have a full description of the process of making 2 extra links in the my account page?
    I would like to make a menu item for “My Jobs” and for “Make a job now”

    I hope you can help me again…
    Henri

    Hey @avjobs13wpacc

    ok, I try to explain as much in detail as I can:
    First open up your childthemes function.php with the editor of your choise remove all of your code with which you tried to get the points up running. Save the functions.php and override it on your server.
    Resave your permalinks. Clear the server cache.
    Now check if your sites with the shortcodes are working. Open up “My Jobs” and “Make a job now”
    They work? Fine.
    Resave your permalinks, just for safety ??
    Now open your childthemes function php with your editor of choise and we start again.
    insert this into the function.php

    function my_account_order() {
    	$myorder = array(
    		'dashboard'          	=> __( 'Dashboard', 'woocommerce' ),
    		'edit-account'       	=> __( 'Data', 'woocommerce' ),
    		'orders'            	=> __( 'Invoices', 'woocommerce' ),
    		'permalink-my-jobs' 	=> __( 'My Jobs', 'woocommerce' ),
    		'permalink-make-a-job-now' 	=> __( 'Make a Job now', 'woocommerce' ),
    		'customer-logout'    	=> __( 'Log Out', 'woocommerce' ),
    	);
    	return $myorder;
    }
    add_filter ( 'woocommerce_account_menu_items', 'my_account_order' );

    Replace “permalink-my-jobs” with the permalink of the site where the [jobs_dashboard] shortcode is located and the same for “permalink-make-a-job-now”
    Save the file, and load it up to your server
    Resave your permalinks again. Sometimes you do have to do this twice or more. Clear the cache of the server.
    Now it should work.
    This is how the code would look like.

    Let me know how if it works, or if you need some more help

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Log in / Registration WooCommerce’ is closed to new replies.