Vendor text description go mess up

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 Vendor text description go mess up

Viewing 3 reply threads
  • Author
    Posts
    • #127786
      Avatarartanett
      Participant

      Why every time vendor save Text for desription its go mess up again and again?

      And how can I put place text holder for this description

      Attachments:
      You must be logged in to view attached files.
    • #127878

      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) PFA

      If 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.
    • #128066
      Avatarartanett
      Participant

      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

    • #128085

      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.php

      add_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.

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