1

I have created e-commerce site with dokan. I want to add each vendor their own livechat. I have configured everything and just need to add short code to each vendor, but Dokan don't create new pages for vendors and I can't figure out how to do it. I sniffed around in Dokan manuals, but can't find this specific field/place to enter shortcode

Can anybody point me into right directon?

N2hvits
  • 329
  • 1
  • 3
  • 15

2 Answers2

0

You can use the dokan_store_profile_frame_after hook which runs only in the store page to add your shortcode. This hook is run just after the store profile. If you want to exclude certain stores, you can use the $store_user and $store_info to filter out the stores. You can add the following code the functions.php file of the theme.

add_action( 'wp_footer', function() {
    $store_user   = dokan()->vendor->get( get_query_var( 'author' ) );
    $store_info   = $store_user->get_shop_info();

    if ( dokan_is_store_page() ) {
       echo do_shortcode( '[contact-form-7 id="64" title="Contact form 1"]');
    }
});
Sagar Bahadur Tamang
  • 2,670
  • 2
  • 24
  • 41
0

You can try using TalkJs. As per their website they support Dokan. https://wordpress.org/plugins/talkjs/ https://talkjs.com/knowledge-base/article/does-talkjs-work-with-support/

Asif
  • 89
  • 1
  • 1
  • 8
  • Sry but this doesen't have videocall function. That's why I need to add shortcode to each dokan vendor I am using 3CX software – N2hvits May 06 '20 at 00:16