How to Set a Default Product Description

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums Product Vendors How to Set a Default Product Description

Viewing 25 reply threads
  • Author
    Posts
    • #122986
      rohitxd
      Participant

      Hey!
      I want to set default product description for vendor product entering page – description (not short description), How should I do it?

      Regards,
      Rohit

    • #122990
      rohitxd
      Participant

      Ah Also
      2) How to make 2 registration forms like when u enter half of the information then in the next page the other info? can we make it?

    • #123375
      rohitxd
      Participant

      reply pls

    • #123781
      rohitxd
      Participant

      please help u guys not suportive

    • #123801

      Hello,

      I want to set default product description for vendor product entering page – description (not short description), How should I do it?
      >>Add this code in your theme’s functions.php

      add_filter('wcfm_marketplace_settings_fields_general', 'wcfm_marketplace_settings_fields_general_custom2704', 50, 2 );
      function wcfm_marketplace_settings_fields_general_custom2704($general_fields,$vendor_id) {
      	$store_product_description = wcfm_get_user_meta( $vendor_id, '_store_product_description', true );
      	if(isset($general_fields['gravatar']) ) {
      		$general_fields['store_product_description']= array('label' => __('Shop Product Description', 'wc-frontend-manager') , 'type' => 'wpeditor', 'class' => 'wcfm-textarea wcfm_custom_field_editor wcfm_ele wcfm_wpeditor', 'label_class' => 'wcfm_title', 'value' => $store_product_description );
      	}
      	return $general_fields;
      }
      
      add_action( 'wcfm_wcfmmp_settings_update','fn_wcfm_vendor_settings_storetype_update2704', 50, 2);
      add_action( 'wcfm_vendor_settings_update','fn_wcfm_vendor_settings_storetype_update2704', 50, 2);
      function fn_wcfm_vendor_settings_storetype_update2704($user_id, $wcfm_settings_form ){	
      	wcfm_update_user_meta( $user_id, '_store_product_description',  $wcfm_settings_form['store_product_description'] );
      }

      Add the below script in your theme’s js file (https://developer.wordpress.org/reference/functions/wp_enqueue_script/)

      jQuery(document).ready(function ($) {
      
         $('#wcfm_store_setting_save_button, #wcfm_store_general_setting_save_button, #wcfm_store_address_setting_save_button').click(function(event) {
          event.preventDefault();
         
          var profile = getWCFMEditorContent( 'shop_description' );
      
            // WCFM Custom field Editor support
          if( $('.wcfm_custom_field_editor').length > 0 ) {
            $('.wcfm_custom_field_editor').each(function() {
              $wcfm_custom_field_editor = $(this);
              if( $wcfm_custom_field_editor.hasClass('rich_editor') || $wcfm_custom_field_editor.hasClass('wcfm_wpeditor') ) {
                $('#'+$wcfm_custom_field_editor.attr('id')).val(getWCFMEditorContent( $wcfm_custom_field_editor.attr('id') ));
              }
            });
          }
         
          // Validations
          $('.wcfm-message').html('').removeClass('wcfm-error').removeClass('wcfm-success').slideUp();
          $wcfm_is_valid_form = true;
          $( document.body ).trigger( 'wcfm_form_validate', $('#wcfm_vendor_manage_store_setting_form') );
          $is_valid = $wcfm_is_valid_form;
          
          if($is_valid) {
            $('#wcfm_vendor_manage_store_setting_form').block({
              message: null,
              overlayCSS: {
                background: '#fff',
                opacity: 0.6
              }
            });
            var data = {
              action                    : 'wcfm_ajax_controller',
              controller                : 'wcfm-vendors-manage-marketplace-settings',
              wcfm_settings_form        : $('#wcfm_vendor_manage_store_setting_form').serialize(),
              profile                   : profile,
            } 
            $.post(wcfm_params.ajax_url, data, function(response) {
              if(response) {
                $response_json = $.parseJSON(response);
                $('.wcfm-message').html('').removeClass('wcfm-error').removeClass('wcfm-success').slideUp();
                if($response_json.status) {
                  wcfm_notification_sound.play();
                  $('#wcfm_vendor_manage_form_store_setting_expander .wcfm-message').html('<span class="wcicon-status-completed"></span>' + $response_json.message).addClass('wcfm-success').slideDown();
                } else {
                  wcfm_notification_sound.play();
                  $('#wcfm_vendor_manage_form_store_setting_expander .wcfm-message').html('<span class="wcicon-status-cancelled"></span>' + $response_json.message).addClass('wcfm-error').slideDown();
                }
                $('#wcfm_vendor_manage_store_setting_form').unblock();
              }
            }); 
          }
        });
         
      });

      Then you will find a field “Shop Product Description” in vendor settings. Here admin/vendor can add default product description.
      To show this field value in product page description section, you have to override description.php from “\wp-content\plugins\woocommerce\templates\single-product\tabs” to “yourtheme/woocommerce/single-product/tabs/description.php”.
      And this code to fetch default product description –

      <?php
      $product_id = get_the_ID();
      $vendor_id   = wcfm_get_vendor_id_by_post( $product_id );
      ?>
      <p><?php echo wcfm_get_user_meta( $vendor_id, '_store_product_description', true );?></p>

      How to make 2 registration forms like when u enter half of the information then in the next page the other info? can we make it?
      >>By default there is no possible setting option to achieve this.But this can be achievable by overriding registration template.

      Or if do you mean,”SUBSCRIBE TO MEMBERSHIP” section in this https://wclovers.com/knowledgebase/wcfm-membership/, then after activate “WCFM – WooCommerce Multivendor Membership” plugin use the Vendor membership page(which contain “[wcfm_vendor_membership]” shortcode) for vendor registration.

      Hope this information will help you.

      Thanks.

    • #123854
      rohitxd
      Participant

      Hi, Thank you so much for replying!

      1) I’ve done all steps as you said (the code stuff) but I cannot find where to set the default product description!?
      2) OK That’s fine 😀

      Regards,
      ROHIT

    • #124071

      Hello,

      You will find the “Shop Product Description” in WCFM store dashboard -> Store vendors -> Select vendor and go to store settings.
      If you still don’t find the field,then
      Can you please share me the screenshot where you have added the code?
      Or share us site details where we can check the code which you have added and the WCFM store dashboard.
      (Set as private reply)

      Thanks.

    • #124099
      rohitxd
      Participant

      Oh Thanks! I found “Shop Product Description” but will it work globally like every new seller should get that description when they add a product

      Thanks so much!
      ROHIT

      • #124104

        Hi,

        Yes you/admin (for each vendor)and vendor have to add “Shop Product Description”.

        I tried setting the “Shop Product Description” then I tried adding a product using my dummy seller account but It doesn’t show it while adding
        >>Do you override description.php from “\wp-content\plugins\woocommerce\templates\single-product\tabs” to “yourtheme/woocommerce/single-product/tabs/description.php” ? You have to add text “Shop Product Description” for your dummy seller account.

        Thanks.

        • #124147
          rohitxd
          Participant

          Yeah i did and also i added the code you said plus those both files look the same

    • #124101
      rohitxd
      Participant

      Update: I tried setting the “Shop Product Description” then I tried adding a product using my dummy seller account but It doesn’t show it while adding :c

    • #124148
      rohitxd
      Participant

      Ah I figured it Out thanks so much for the help dude you’re a god!

    • #124161
      rohitxd
      Participant

      Ohhhh! btw How can we redirect sellers to there shop page when they login??
      AND

      Why can’t the seller edit the default product description while adding a product???
      Please help i need that

    • #124188

      Hello,

      How can we redirect sellers to there shop page when they login??
      >>When any seller/vendor register in your site it will took him store setup page/ thank you page. Vendor can click on “My Store” link in store dashboard will take him his store page.(PFA)

      Why can’t the seller edit the default product description while adding a product???
      >>Did you mean vendor can not edit their “Shop Product Description” field? It’s not depending on adding a product. Please check that you have added all codes which was previously mentioned and then recheck. IT’s working in our server.

      Thanks.

      Attachments:
      You must be logged in to view attached files.
    • #124410
      rohitxd
      Participant

      1) OKAY!
      2) I want to add something like footer and it should appear in the product description so the seller can add there names in there and add the other stuff about the product
      How It should look while adding the product to the seller – https://prnt.sc/s7jm98
      How It should look in the product description – http://prnt.sc/s7jomg

      I want it to be appear in every new sellers product description like it should be a global product description that should come by default to every seller when there adding a product and they must be able customize it and add there own words…

    • #124747

      Hello,

      How It should look while adding the product to the seller – https://prnt.sc/s7jm98
      >> In “WordPress editor” we can add default a text (like this product owned by …) but it’s not possible to add this text at bottom of the editor. You/vendor have to enter the product content before/above this text.

      I want it to be appear in every new sellers product description like it should be a global product description that should come by default to every seller when there adding a product and they must be able customize it and add there own words…
      >>Your current requirement is totally different from the topic(I want to set default product description for vendor product entering page – description , How should I do it?) which you asked at the beginning. So which one will be your final requirement in product page front-end???
      Scenario 1:
      will it display like?

      <Product description>(from product edit dashboard)
      <product description default/footer text>(in product edit dashboard)(This product owned by ...)
      <Globally added shop description>(From vendor settings)

      Scenario 2:

      <Product description>(from product edit dashboard)
      <product description default/footer text>(in product edit dashboard)(This product owned by ...)
      

      only the above two description and “Globally added shop description” this will be removed?

      Let us know.

      Thanks.

    • #124995
      rohitxd
      Participant

      but it’s not possible to add this text at bottom of the editor. You/vendor have to enter the product content before/above this text.

      No any way???

    • #125145

      Hello,

      You have to override the “wcfm-view-products-manage.php” from “\wp-content\plugins\wc-frontend-manager\views\products-manager” to your theme folder – “yourtheme folder/wcfm/products-manager/wcfm-view-products-manage.php”
      Then you have to modify the “description” variable with $description = '<br/><br/><br/><br/><br/>This Product is owned by [Type your Shop Name]'; where it is defined. (PFA)

      Thanks.

      Attachments:
      You must be logged in to view attached files.
    • #125322
      rohitxd
      Participant

      I didn’t have a yourtheme folder/wcfm/products-manager/ wcfm-view-products-manage.php folder so I created a one added it, is that okay?

    • #125324
      rohitxd
      Participant

      OMG Thanks man! You saved my life
      Appreciating the service you gave, Love it!

      BEST REGARDS,
      ROHIT

    • #125325

      You are always welcome 🙂

      Can we ask for a favor? Would you mind taking a few minutes to review our plugin at https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/ and let others know about your 5 Star experience with WCFM Marketplace. Also, follow us on Twitter https://twitter.com/wcfmmp for more exciting news, important updates, and irresistible offers.

      We are closing this topic.

      Thanks.

    • #125368
      rohitxd
      Participant

      Ya Sure! Let me leave review for y’all!!

    • #127680
      rohitxd
      Participant

      Hey I’ve got a problem!
      https://prnt.sc/sbtga1 – After adding the default description it doesn’t show some required fields

      I need the Shipping field and inventory field back please!

    • #127910

      Hello,

      After adding the default description it doesn’t show some required fields
      >> Product Shipping field and inventory field not depends on product description, or previously mentioned code in this thread. You can check this removing all added code which was mentioned previously in this thread.(Before that make a backup).

      I need the Shipping field and inventory field back please!
      >>Check the vendor capability (WCFM store dashboard -> Capability), it’s turn-on or not.

      Thanks.

      Attachments:
      You must be logged in to view attached files.
    • #127948
      rohitxd
      Participant

      Hello I’ve removed the code I previously added (the part inside the $desciption='(removedhere)’) and check and here is the result – https://prnt.sc/scgohv so the problem should be in that file so tried moving the folder i created “products-manager” to different location so it would detect it, and here is the result https://prnt.sc/scgpnf So that means the “wcfm-view-products-manage.php” have some problem, Please help also do you know how to remove this part https://prnt.sc/scgqgd

      Thanks
      BEST REGARDS,
      ROHIT

    • #127953

      Hello,

      Sorry, But it’s really confusing between your issue and requirement.
      You have to override the “wcfm-view-products-manage.php” and “wcfm-view-products-manage-tabs.php” from “\wp-content\plugins\wc-frontend-manager\views\products-manager” to your theme folder – “yourtheme folder/wcfm/products-manager/”

      and in “wcfm-view-products-manage.php” this file you have to add –$description = '<br/><br/><br/><br/><br/>This Product is owned by [Type your Shop Name]';
      display Shipping field and inventory field – did you check WCFM dashboard -> capability?And Groups Capability?

      To remove policy tab add this css in your theme’s style.css –

      div#wcfm_products_manage_form_policies_head {
          display: none !important;
      }

      Thanks.

    • #127957
      rohitxd
      Participant

      You have to override the “wcfm-view-products-manage.php” and “wcfm-view-products-manage-tabs.php” from “\wp-content\plugins\wc-frontend-manager\views\products-manager” to your theme folder – “yourtheme folder/wcfm/products-manager/”
      >> This worked I didn’t add “wcfm-view-products-manage-tabs.php” to the folder thanks!

      To remove policy tab add this css in your theme’s style.css
      >> Tried adding, but didn’t work

    • #127959
      rohitxd
      Participant

      Ah Figured out

      #wcfm_products_manage_form_policies_head {
        display: none !important;
      }
      

      Removing the div worked
      This code worked instead of that

      Thanks!

Viewing 25 reply threads
  • You must be logged in to reply to this topic.