"add a franchise"

This topic contains 8 replies, has 4 voices, and was last updated by  Alex Rollin 5 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #468202

    virgi
    Expired Member
    Post count: 37

    Hi,

    is it possible to add “add a franchise” in the user dashboard ?

    because it’s complicated to find it for users.

    Thanks you in advance

    #468225

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I asked to the developers to check if possible.

    They’ll let you know asap.

    Thanks

    #468242

    virgi
    Expired Member
    Post count: 37

    Thanks

    #468385

    Kiran
    Moderator
    Post count: 7069

    Hello,

    Add Franchise action is displaced under author actions(Edit, Delete) widget etc(see screenshot) which has actions for the viewing listing. User dashboard contains links for users’s listings page, favorites page, profile etc.

    If you add Author Actions widget then it will display “Add Franchise” action on the listing page and under author actions.

    If you still want to display “Add Franchise” under User Dashboard widget, then let me know i will provide snippet for that.

    Kiran

    #468419

    virgi
    Expired Member
    Post count: 37

    Hi

    thank you
    I have already done this, but I find the path not easy for users. I think that instinctively we look for this action in the dashboard.
    If you have the code extract to add it to the dasboard, it would be great…

    Thanks

    #468428

    Kiran
    Moderator
    Post count: 7069

    Hello,

    Add following code snippet to display “Add Franchise” link above the user dashboard links.

    
    
    /**
     * Display add franchise link under user dashboard widget.
     */
    function gd_snippet_190212_dashboard_links( $dashboard_links ) {
    	global $gd_post;
    
    	if ( ! ( function_exists( 'geodir_franchise_add_franchise_link' ) && ! empty( $gd_post->ID ) && is_user_logged_in() && geodir_is_page( 'detail' ) ) ) {
    		return $dashboard_links;
    	}
    
    	$franchise_link = geodir_franchise_add_franchise_link( $gd_post->ID );
    	if ( ! $franchise_link ) {
    		return $dashboard_links;
    	}
    	$franchise_link = '<li>' . $franchise_link . '</li>';
    
    	$dashboard_links = $franchise_link . $dashboard_links; // Display before dashboard links
    	//$dashboard_links .= $franchise_link; // Display after dashboard links
    
    	return $dashboard_links;
    }
    add_filter( 'geodir_dashboard_links', 'gd_snippet_190212_dashboard_links', 20, 2 );

    Kiran

    #468435

    Alex Rollin
    Moderator
    Post count: 27815

    For clarification, this snippet does almost exactly the same thing as the normal link included in the GD > Author Actions widget, it just shows the link inside the Dashboard widget.

    Also, to be clear, it is the same also that it only displays on the parent or franchise listing detail page, and only when the list has “Has Franchise” set to yes.

    #468443

    virgi
    Expired Member
    Post count: 37

    yes, indeed, it doesn’t solve my problem, because I had already added this link. The problem is that users do not think to click on the mother list to find this link.

    do you have a solution to display this link elsewhere?

    Thanks

    #468466

    Alex Rollin
    Moderator
    Post count: 27815

    The Add Franchise link is displayed with GD Author Actions element, anywhere where the Author Actions are displayed.

    You can display author actions inside the Detail or Archive Item.

    Are you using UsersWP? If you are then the author actions will show also in the “My Listings” inside each of the listings, as long as you have included Author Actions inside the archive item template.

    Generally speaking it is not possible outside of those options to display the link anywhere else because there is a practical requirement to link the “Add Franchise” link and the resulting form BACK to the original parent listing where “Has Franchise” has been checked off.

Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket