Page not found

General Marketplace Discussion (User’s interaction forum)

Page not found Open

Viewing 10 reply threads
  • Author
    Posts
    • #75054
      Amulya Raavan
      Participant

      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

    • #75136

      @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.

    • #75202
      Amulya Raavan
      Participant

      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

    • #75263
      sumit singh
      Moderator

      You have to define hook for function

      wcmp_get_vendor_dashboard_navigation
      Copy

      .

    • #75313
      Amulya Raavan
      Participant
      This reply has been marked as private.
    • #75314
      Amulya Raavan
      Participant

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

    • #75832
      Amulya Raavan
      Participant
      This reply has been marked as private.
    • #75833
      This reply has been marked as private.
    • #76193
      sumit singh
      Moderator

      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";
      }
      Copy
    • #76197
      Amulya Raavan
      Participant

      Tq so much
      it’s working

    • #76203

      You are welcome @Amulya Raavan

Viewing 10 reply threads

Please LOGIN to reply to this topic

COVID-19 Outbreak: WCMp team is supporting business affected by coronavirus

Read the Message Buy at Slashed Price