WCMp bundle is available at a slashed price

Grab It Now

Page not found

Page not found2019-09-30T03:40:19-05:00

General Marketplace Discussion (User’s interaction forum)

Page not found Open

  • Author
    Posts
  • Amulya Raavan
    Participant
    Post count: 21

    add_action( ‘wcmp_vendor_dashboard_service-details_endpoint’, array( &$this, ‘wcmp_vendor_dashboard_service_details_endpoint’ ) );

    ‘service-details’ => array(
    ‘label’ => __( ‘Service Details’, ‘dc-woocommerce-multi-vendor’ )
    , ‘url’ => wcmp_get_vendor_dashboard_endpoint_url( get_wcmp_vendor_settings( ‘wcmp_service_details_endpoint’, ‘vendor’, ‘general’, ‘service-details’ ) )
    , ‘capability’ => apply_filters( ‘wcmp_vendor_dashboard_menu_service_details_capability’, true )
    , ‘position’ => 40
    , ‘submenu’ => array()
    , ‘link_target’ => ‘_self’
    , ‘nav_icon’ => ‘wcmp-font ico-tools-icon’
    ),

    public function wcmp_vendor_dashboard_service_details_endpoint() {
    global $WCMp;
    $WCMp->template->get_template( ‘vendor-dashboard/service-details.php’ );
    }

    if i am added this code in class-wcmp-vendor-hooks.php….it is showing like page not found(404 error)
    can you please slove this one

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 5381

    @Amulya Raavan, please don’t add any custom code in core plugin file.

    Add the custom code one by one in the function.php of the current active theme. Then check the dashboard page.

    If the issue still exist, let us know. we will help you out accordingly.

  • Amulya Raavan
    Participant
    Post count: 21

    add_action( ‘wcmp_vendor_dashboard_service-details_endpoint’, array( &$this, ‘wcmp_vendor_dashboard_service_details_endpoint’ ) );

    function wcmp_get_vendor_dashboard_navigation() {
    $vendor_nav = array(
    ‘service-details’ => array(
    ‘label’ => __(‘Service Details’, ‘dc-woocommerce-multi-vendor’)
    , ‘url’ => wcmp_get_vendor_dashboard_endpoint_url( get_wcmp_vendor_settings( ‘wcmp_service_details_endpoint’, ‘vendor’, ‘general’, ‘service-details’ ) )
    , ‘capability’ => apply_filters( ‘wcmp_vendor_dashboard_menu_service_details_capability’, true )
    , ‘position’ => 40
    , ‘submenu’ => array()
    , ‘link_target’ => ‘_self’
    , ‘nav_icon’ => ‘wcmp-font ico-tools-icon’
    )
    );
    return apply_filters( ‘wcmp_vendor_dashboard_nav’, $vendor_nav );
    }
    function wcmp_vendor_dashboard_service_details_endpoint() {
    global $WCMp;
    $WCMp->template->get_template( ‘vendor-dashboard/service-details.php’ );
    }

    if i am adding this code in functions.php…..website is not open

  • sumit singh
    Moderator
    Post count: 26

    You have to define hook for function wcmp_get_vendor_dashboard_navigation.

  • Amulya Raavan
    Participant
    Post count: 21
    This reply has been marked as private.
  • Amulya Raavan
    Participant
    Post count: 21

    can you please share the full code how to write that code in functions.php

  • Amulya Raavan
    Participant
    Post count: 21
    This reply has been marked as private.
  • NerdySupportExpert Moumita
    Keymaster
    Post count: 5381
    This reply has been marked as private.
  • sumit singh
    Moderator
    Post count: 26

    Hi, please follow the below code flow

    /*add endpoint*/
    add_filter( 'wcmp_vendor_dashboard_nav', 'add_vendor_product_endpoint' );
    function add_vendor_product_endpoint( $vendor_nav ) {
    if( current_user_can( 'edit_products' ) ) {
    
    $vendor_nav['vendor-products']['submenu']['demo'] = array(
    'label'       => 'demo',
    'url'         => wcmp_get_vendor_dashboard_endpoint_url( get_wcmp_vendor_settings( 'wcmp_demo_endpoint', 'vendor', 'general', 'demo' ) ) 
    , 'capability'  => apply_filters( 'wcmp_vendor_dashboard_menu_demo_capability', true )
    , 'position'    => 45
    , 'link_target' => '_self'
    );
    
    }
    return $vendor_nav;
    }
    
    /*Query vars to add to WP*/
    add_filter( 'wcmp_endpoints_query_vars', 'add_demo_endpoint' );
    function add_demo_endpoint( $endpoint ) {
    $endpoint['demo'] = array(
    'label' => 'Out of stock product subscriber',
    'endpoint' => get_wcmp_vendor_settings('wcmp_demo_endpoint', 'vendor', 'general', 'demo') );
    return $endpoint;
    }
    
    /*content of new endpoint*/
    add_action( 'wcmp_vendor_dashboard_demo_endpoint', 'wcmp_vendor_dashboard_demo_endpoint' );
    function wcmp_vendor_dashboard_demo_endpoint() {
    echo "show";
    }
  • Amulya Raavan
    Participant
    Post count: 21

    Tq so much
    it’s working

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 5381

    You are welcome @Amulya Raavan

Please LOGIN to reply to this topic