Okay
  Public Ticket #3722037
Hide product Short description
Closed

Comments

  •  8
    Tasos started the conversation

    Hi is it possible to remove from vendors dashboard product description 


    Also how to make normal description plain text with not mce editor?

  •  2,212
    WebWizards replied

    Hello Tasos,

    To remove the short description from the vendor dashboard, you can add the following PHP code snippet to your site:

    add_action('marketking_dashboard_head', function(){
        ?>
        <script>
            jQuery(document).ready(function(){
                jQuery('#shortpostexcerpt').remove();
            });
        </script>
        <style>
            #shortpostexcerpt{
                display:none !important;
            }
        </style>
        <?php
    });
    

    Regarding using a plain text editor instead of mce, I'm afraid we don't currently have an option for that. The plugin directly renders the WooCommerce description area which includes that editor.

  •  8
    Tasos replied

    works PERFECT

    one question about this though

    its more normal under title to have the description and the all the rest. Can we change this order?

    (sorry for so many tickets every day..)

  •  8
    Tasos replied

    1) Change description order to go under title if its possible

    2) Remove Tags

    3) Found a way to remove tinymce you can have it in case anyone else needed:

    function remove_tinymce_and_use_plain_textarea() {
        ?>
        <script type="text/javascript">
            jQuery(document).ready(function($) {
                function removeTinyMCE() {
                    // Αφαίρεση όλων των εργαλείων και στοιχείων του TinyMCE
                    $('#wp-longexcerpt-wrap').removeClass('tmce-active html-active wp-core-ui wp-editor-wrap').addClass('plain-text-wrap');
                    // Αφαίρεση των γραμμών εργαλείων του TinyMCE
                    $('#wp-longexcerpt-editor-tools').remove();
                    $('.mce-toolbar-grp').remove(); // Καταργεί τις γραμμές εργαλείων του TinyMCE
                    $('.mce-container').remove(); // Καταργεί όλα τα υπόλοιπα containers του TinyMCE
                    $('.quicktags-toolbar').remove(); // Καταργεί όλα τα Quicktags
                    // Αφαιρούμε τα iframes που σχετίζονται με τον TinyMCE
                    $('iframe').remove();
                    // Ενεργοποιούμε και εμφανίζουμε το απλό textarea
                    $('#longexcerpt').show().removeAttr('aria-hidden').removeAttr('style').css({'display': 'block', 'width': '100%', 'height': '200px'});
                    // Προαιρετικά: Προσθέστε ένα placeholder στο textarea
                    $('#longexcerpt').attr('placeholder', 'Εισάγετε το κείμενό σας εδώ...');
                }
                // Καθυστερούμε την εκτέλεση για να βεβαιωθούμε ότι όλα τα στοιχεία έχουν φορτωθεί
                setTimeout(removeTinyMCE, 1000); // Περιμένουμε 1 δευτερόλεπτο πριν την εκτέλεση της αφαίρεσης
            });
        </script>
        <?php
    }
    add_action('wp_footer', 'remove_tinymce_and_use_plain_textarea');-->
    
  •  2,212
    WebWizards replied

    Hi again,

    To change the order and move the description under the title, I believe the best solution would be to edit the template directly, similar to what we described here for removing tags: https://webwizards.ticksy.com/ticket/3723544/

    You would need a change to the edit-product.php template.

    You can copy that from the MarketKing Core files, to the wp-content/themes/child-theme/marketking/edit-product.php location. There you can simply edit the .php file and move the descriptions in a different place within the file (below the title).


    I took a quick video to show what the change in the code is: https://www.loom.com/share/750d5293c3ce4b13948fc4c69769f04f?sid=08c3ab52-f595-4ea3-ac37-7f04ce30def6 (basically just moving the description row higher above).