• Resolved mmasouddd

    (@mmasouddd)


    Hi
    I created a new sidebar in dashboard vendor’s page and I want to create a button at there.It should each vendor can click on this button and go to his/her store page. I want to have a shortcode to do this. Please help me
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @mmasouddd

    Right now a shortcode to show the vendor store URL is unavailable by default. By default, Dokan provides a link to the vendor’s own store on the vendor dashboard as shown in this screenshot.

    If you want to create a shortcode to show the store URL then this will require proper customization. According to our support policy, we are unable to provide a custom solution to our users.

    However, I can give a hint on how you may proceed to achieve your goal. You can have a look at this gist for a reference on how to create a custom shortcode.

    To get to know about the function that is used to get the store URL of a vendor, you can have a look at dokan_get_store_url() function defined in wp-content/plugins/dokan-lite/includes/functions.php this file.

    I hope this will help.

    Thread Starter mmasouddd

    (@mmasouddd)

    Thank you for your answer
    Yes I want to recreate this button

    I am sorry, I am not developer and I can not understand these codes means. Please give me a shortcode codes to do this.

    I found these codes in the internet. The problem is the shortcode only shows admin store’s page and not shows own vendor’s pages. Whats wrong

    ——————————–

    function get_store_url($atts){
    
        $a = shortcode_atts(
            array(
          'id' => '1',
       ), 
        $atts );
    $seller_id  = get_user_by( 'id', $a['id'] );
    $vendor = dokan()->vendor->get( $seller_id );
    
                    return  $vendor->get_shop_url();
    }
    add_shortcode( 'store_vendor_url', 'get_store_url' );

    ——————————-

    shortcode:
    [store_vendor_url id=”[wpv-user field=’ID’]”]

    Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @mmasouddd

    We are unable to review any code done from the user’s end according to our support policy.

    Please use the get_current_user_id function of WordPress to get the current user’s ID. Then use dokan_get_store_url function to get the URL. If you are not comfortable with codes, then please consult with an expert about this as we are unable to assist with custom solutions.

    I hope this explains the scenario.

    Hi,
    Kindly send me vendor shop url dynamic code
    I wanna placed it account page
    thank you.

    Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @mmasouddd & @touseef76,

    We haven’t heard anything back from you or any other users with any additional suggestions regarding this. Due to inactivity, we are marking this topic as resolved. Feel free to open a new one if you face any further issues.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘vendor store link’ is closed to new replies.