Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @nooraddin ,

    At the moment any shortcode to show all the vendor info is unavailable.

    However if you are familiar with PHP then you can make use of the vendor info tab function and add them for the checkout page. Please check this code reference from – \dokan-lite\includes\wc-template.php

    function dokan_product_seller_tab( $val ) {
        global $product;
    
        $author_id  = get_post_field( 'post_author', $product->get_id() );
        $author     = get_user_by( 'id', $author_id );
        $store_info = dokan_get_store_info( $author->ID );
    
        dokan_get_template_part('global/product-tab', '', array(
            'author' => $author,
            'store_info' => $store_info,
        ) );
    }

    Thank you.

    Thread Starter Nooraddin Abuzina

    (@nooraddin)

    Sorry @rur165 , but how can I add this tab for the checkout page,

    that code you sent it is existing in the file: wc-template.php, but I don’t know how to put the tab into checkout page.

    Thank you.

    Hello @nooraddin ,

    There are multiple ways you can perform the task. You can open the main template file of WooCommerce checkout from here – woocommerce/templates/checkout/form-checkout.php. You will find several hooks to use with the custom code you are planning to use.

    For example to access the vendor email you may use this code –
    dokan()->vendor->get( $vendor_id )->get_email();

    You can access all vendor details like the abobe which are available here – dokan-lite/includes/Vendor/Vendor.php

    The vendor tab solution I provided earlier will also work. If you do not have enough idea on how to add a new function to available hooks then please consult with a developer for custom work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘show vendor info on checkout page’ is closed to new replies.