Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › Product Vendors › How to Set a Default Product Description
Tagged: description, product-description
- This topic has 28 replies, 2 voices, and was last updated 3 years, 11 months ago by rohitxd.
- AuthorPosts
- April 25, 2020 at 10:08 pm #122986rohitxdParticipant
Hey!
I want to set default product description for vendor product entering page – description (not short description), How should I do it?Regards,
Rohit - April 25, 2020 at 10:25 pm #122990rohitxdParticipant
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? - April 26, 2020 at 9:40 pm #123375rohitxdParticipant
reply pls
- April 27, 2020 at 8:59 pm #123781rohitxdParticipant
please help u guys not suportive
- April 27, 2020 at 9:57 pm #123801Sarmistha ChakrabortyKeymaster
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.phpadd_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.
- April 28, 2020 at 12:12 am #123854rohitxdParticipant
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 - April 28, 2020 at 11:50 am #124071Sarmistha ChakrabortyKeymaster
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.
- April 28, 2020 at 12:59 pm #124099rohitxdParticipant
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- April 28, 2020 at 1:08 pm #124104Sarmistha ChakrabortyKeymaster
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.
- April 28, 2020 at 1:03 pm #124101rohitxdParticipant
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
- April 28, 2020 at 3:32 pm #124148rohitxdParticipant
Ah I figured it Out thanks so much for the help dude you’re a god!
- April 28, 2020 at 3:46 pm #124161rohitxdParticipant
Ohhhh! btw How can we redirect sellers to there shop page when they login??
ANDWhy can’t the seller edit the default product description while adding a product???
Please help i need that - April 28, 2020 at 4:28 pm #124188Sarmistha ChakrabortyKeymaster
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. - April 28, 2020 at 11:49 pm #124410rohitxdParticipant
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/s7jomgI 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…
- April 29, 2020 at 9:48 pm #124747Sarmistha ChakrabortyKeymaster
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.
- April 30, 2020 at 2:00 pm #124995rohitxdParticipant
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???
- April 30, 2020 at 9:43 pm #125145Sarmistha ChakrabortyKeymaster
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. - May 1, 2020 at 1:47 pm #125322rohitxdParticipant
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?
- May 1, 2020 at 1:57 pm #125324rohitxdParticipant
OMG Thanks man! You saved my life
Appreciating the service you gave, Love it!BEST REGARDS,
ROHIT - May 1, 2020 at 2:00 pm #125325Sarmistha ChakrabortyKeymaster
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.
- May 1, 2020 at 3:26 pm #125368rohitxdParticipant
Ya Sure! Let me leave review for y’all!!
- May 7, 2020 at 12:05 am #127680rohitxdParticipant
Hey I’ve got a problem!
https://prnt.sc/sbtga1 – After adding the default description it doesn’t show some required fieldsI need the Shipping field and inventory field back please!
- May 7, 2020 at 1:17 pm #127910Sarmistha ChakrabortyKeymaster
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. - May 7, 2020 at 2:45 pm #127948rohitxdParticipant
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 - May 7, 2020 at 3:05 pm #127953Sarmistha ChakrabortyKeymaster
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.
- May 7, 2020 at 3:28 pm #127957rohitxdParticipant
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 - May 7, 2020 at 3:32 pm #127959rohitxdParticipant
Ah Figured out
#wcfm_products_manage_form_policies_head { display: none !important; }
Removing the div worked
This code worked instead of thatThanks!
- AuthorPosts
- You must be logged in to reply to this topic.