• Resolved thedream09

    (@thedream09)


    Hi.

    I would like to add URL shop for logged user. So they can direct to visit there shop without move 2 step: dashboard –> shop url

    I added following
    https://domain.com/vendor/{username}

    But it did not work, what should i correct it?

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • @thedream09 May we know where do you want to add the shop URL, will it be on the My account page. Please do let us know this so that we can assist you accordingly.

    Thread Starter thedream09

    (@thedream09)

    Hi. I just simple want to add it in wordpress menu “Custom Link”

    Kindly use this code snippet :

    add_action('admin_menu', 'example_admin_menu');
    
    function example_admin_menu() {
       global $submenu;
       if(is_user_wcmp_vendor(get_current_user_id())){
       	// add menu in dashboard submenu
       	$submenu['index.php'][] = array('Shop URL', 'manage_options', $vendor->permalink);
       }
    }
    Thread Starter thedream09

    (@thedream09)

    Hi my theme used primary menu (storefront theme)

    I would like to add in primary menu, not admin_menu. what should is correct?

    By the way, how do i handle it as stay in which position and which sub-menu

    Here i have
    Parent1 | Parent2 | Parent3

    So i want to add shop URL as bellow.
    Parent1/visit-shop

    @thedream09, thanks for the clarification. As we can understand that you want to display the shop URL in the primary menu, that you can add via WP-admin >> Appearance >> Menue, for further assistance kindly refer here – https://drive.google.com/a/dualcube.com/file/d/1n4LtH9NcRXvFDuMXvQ_mcPDTUYOsFRtk/view?usp=drivesdk

    Let us know if you have any further query.

    Thread Starter thedream09

    (@thedream09)

    Oh no this is not right.
    Example: If i had 1000 vendor, then i have to add 1,000 items in menu?

    I mean only 1 URL but it will changed to correct shop url depend on logged vendor. How do i have it?

    @thedream09 In that case you have to create a menu and have to do coding level customisation by checking whether the current user is logged in and where he/she has vendor_id. If they have vendor_id, then you have to send them to their shop page URL.

    Thread Starter thedream09

    (@thedream09)

    Can you update the vendor url endpoint smarter like this?
    By now you provided endpoind vendor by listed vendor url only.

    @thedream09 I have forwarded this request to our development team.

    If we receive this feature request from our other users also, we will defiantly try to add this.

    Thread Starter thedream09

    (@thedream09)

    Thank you for confirm.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Shop URL in menu’ is closed to new replies.