Home Forums Theme Support Dokan How can I do if want to add plugin icon on vendor-side product description part.

This topic is: resolved

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  jeongsik min 3 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #73959

    jeongsik min
    Member
    Post count: 21

    I Want to let vendors can use other plugins to edit their on ‘seller dashboard> product description section'. (such as 3d tool box plugin icon so that can upload 3d pictures himself)

    For do this, What php file I should edit, what line-number?

    #73973

    towhid
    Participant
    Post count: 4505

    Hello Jeongsik,

    Please navigate to plugins/dokan/templates/products/new-product-single.php

    Now find these lines:

    <div class="dokan-product-short-description">
                                <label for="post_excerpt" class="form-label"><?php _e( 'Short Description', 'dokan' ); ?></label>
                                <?php wp_editor( $post_excerpt , 'post_excerpt', array('editor_height' => 50, 'quicktags' => false, 'media_buttons' => false, 'teeny' => true, 'editor_class' => 'post_excerpt') ); ?>
                            </div>

    You have to customize this line :
    <?php wp_editor( $post_excerpt , 'post_excerpt', array('editor_height' => 50, 'quicktags' => false, 'media_buttons' => false, 'teeny' => true, 'editor_class' => 'post_excerpt') ); ?>

    Hope the above solution will help you. If there's anything else needed please let me know.

    Thanks

    #74053

    jeongsik min
    Member
    Post count: 21

    1.I think I must edit ‘post_excerpt' variable to add a new plugin, right?
    Where can I find out the php file and section of defining ‘id=post_excerpt' ?

    2.Can I edit this ‘id=post_excerpt' by using TinyMCE plugin?

    #74093

    towhid
    Participant
    Post count: 4505

    Hello Jeongsik,

    Don't change $post_excerpt variable. Only change ‘teeny' => true to ‘teeny' => false and let me know the result.

    Thanks

    #74237

    jeongsik min
    Member
    Post count: 21

    It works. But, This plugin also needs the admin's setting section which upload 3d files in the admin's dashboard menu.(using the created button only can make 3d canvas and set canvas size).
    I must the add the function which on admin's dashboard menu to vendor's add product section.

    My resolving thinking is,
    1.make button on click to open that function in vendor's add product section.
    (When developer adds plugin into dashboard menu, he must use this ‘add_menu_page()'. In here, I can find out which function is called when click this menu bar. ‘can3DPro_layout' is the function name. belows are the plugin's php file.)

    add_menu_page('Canvasio3DPro Options', 'Canvasio3DPro','upload_files','Canvasio3DPro_Edit', 'can3DPro_layout');//'edit_others_posts' // 'upload_files' // read
    		if($c=='toplevel_page_Canvasio3DPro_Edit'){
    			caActivBackend();
    		}
    	}
    	//
    	function can3DPro_layout() {
    		$modus = array('modus'=>'backEnd');
    		initCaHandler($modus);
    	}

    I can make button in ‘new-product-single.php'. please let me know how to link it to the function.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘How can I do if want to add plugin icon on vendor-side product description part.’ is closed to new replies.