About the position, size, language of custom variation field change

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 WCFM – Ultimate About the position, size, language of custom variation field change

Viewing 5 reply threads
  • Author
    Posts
    • #29658
      MOHO
      Participant

      About variable product, you give me code to create custom feild at each variable option.

      1. Each variable option have “Description” field where could i translate chinese word?

      2. Now i want to move left and became smaller the field width, such as upper field width.
      How could i make it?

      thanks.

      Attachments:
      You must be logged in to view attached files.
    • #29664
      WCFM Forum
      Member

      Hi,

      1. This string is at WCFM Ultimate translation file.

      2. Well, you just have to add classes at that field’s label and input. Label class – wcfm_half_ele_title, Element Class – wcfm_half_ele

      My code has this block –

      function wcfm_product_manage_fields_variations_mpr( $variation_fileds, $variations, $variation_shipping_option_array, $variation_tax_classes_options ) {
      	global $WCFM, $WCFMu;
      	
      	$mrp_price_fields = array(  
      													"mrp_price" => array('label' => __('MRP Price', 'wc-frontend-manager-ultimate') , 'type' => 'text', 'class' => 'wcfm-text wcfm_ele variable', 'label_class' => 'wcfm_title wcfm_ele variable' ),
      													);
      	$variation_fileds = array_merge( $variation_fileds, $mrp_price_fields);
      	
      	return $variation_fileds;
      }
      add_filter( 'wcfm_product_manage_fields_variations', 'wcfm_product_manage_fields_variations_mpr', 100, 4 );

      where change this line –

      “mrp_price” => array(‘label’ => __(‘MRP Price’, ‘wc-frontend-manager-ultimate’) , ‘type’ => ‘text’, ‘class’ => ‘wcfm-text wcfm_ele wcfm_half_ele variable’, ‘label_class’ => ‘wcfm_title wcfm_ele wcfm_half_ele_title variable’ ),
      );

      Thank You

    • #29670
      MOHO
      Participant

      It work, thanks

      and i have this question:
      How could change custom field as “number” field, just like price field?

      Attachments:
      You must be logged in to view attached files.
    • #29672
      WCFM Forum
      Member

      Hi,

      Great 🙂

      Just change it’s type to “number” –

      ‘type’ => ‘text’ change this to ‘type’ => ‘number’

      Thank You

    • #29673
      MOHO
      Participant

      Yes it work now!

      and i forgot how add “?” icon for my custom field?

    • #29678
      WCFM Forum
      Member

      Please add 'hints' => 'Your message' to that field and it will show as ‘?’

      Thank You

Viewing 5 reply threads
  • The topic ‘About the position, size, language of custom variation field change’ is closed to new replies.