Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › Product Vendors › Vendor text description go mess up
- This topic has 3 replies, 2 voices, and was last updated 3 years, 11 months ago by Sarmistha Chakraborty.
- AuthorPosts
- May 7, 2020 at 4:24 am #127786
- May 7, 2020 at 12:07 pm #127878Sarmistha ChakrabortyKeymaster
Hello,
We have checked your “Product description” screenshot,
Firstly check “Rich editor” capability is turn-on or off.It should be turn-on.(WCFM store dashboard -> Capability) PFAIf you still have same issue, most probably this is happening due to some plugin conflict. Kindly disable all other plugins except WooCommerce and WCFM plugins. And check once.
If it will work then after that you can enable rest of the plugins one by one to find out the cause.
Let us know how it goes.Regarding default product image change, create “img” folder in your activated child theme, then put the image in this folder and add the below code in your child theme’s functions.php –
add_filter('wcfm_default_placeholder_image',function($imgurl){ $imgurl = get_stylesheet_directory_uri().'/img/your_required_image.png'; //replace the image name and put the image in your child theme folder/img folder return $imgurl; });
Thanks!
Attachments:
You must be logged in to view attached files. - May 7, 2020 at 7:55 pm #128066artanettParticipant
Thank you for your respone,
1. Yeah text description go messup because disable “Rich editor”
2. You code just function if we Add new Image. But existing image not change, still use default image.
3. How can I put place text placeholder @ description field, so every vendor can see sample how to make the description.Thank you
- May 7, 2020 at 8:18 pm #128085Sarmistha ChakrabortyKeymaster
Hello,
2. You code just function if we Add new Image. But existing image not change, still use default image.
>>Sorry this point is not clear, please explain little more.3. How can I put place text placeholder @ description field, so every vendor can see sample how to make the description.
>>In description field(in rich editor) you can not add placehoder. You can add default text. For this add below code n your theme’s functions.phpadd_filter('wcfm_product_manage_fields_content','remove_some_shpping_fields',15,3); function remove_some_shpping_fields($fields, $product_id, $product_type){ global $wp; $description = 'This is Product Description'; if( isset( $wp->query_vars['wcfm-products-manage'] ) && !empty( $wp->query_vars['wcfm-products-manage'] ) ) { $product = wc_get_product( $wp->query_vars['wcfm-products-manage'] ); if( !is_a( $product, 'WC_Product' ) ) { wcfm_restriction_message_show( "Invalid Product" ); return; } // Fetching Product Data if($product && !empty($product)) { $product_id = $wp->query_vars['wcfm-products-manage']; $description = wpautop( $product->get_description( 'edit' ) ); $rich_editor = apply_filters( 'wcfm_is_allow_rich_editor', 'rich_editor' ); if( !$rich_editor && apply_filters( 'wcfm_is_allow_editor_newline_replace', true ) ) { $breaks = apply_filters( 'wcfm_editor_newline_generators', array("<br />","<br>","<br/>") ); $description = str_ireplace( $breaks, "\r\n", $description ); $description = strip_tags( $description ); } } } $fields['description']['value'] = $description; return $fields; }
Thanks.
- AuthorPosts
- You must be logged in to reply to this topic.