Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › About the position, size, language of custom variation field change
- This topic has 5 replies, 2 voices, and was last updated 6 years, 3 months ago by WCFM Forum.
- AuthorPosts
- August 25, 2018 at 7:04 am #29658MOHOParticipant
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. - August 25, 2018 at 7:19 am #29664WCFM ForumMember
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
- August 25, 2018 at 7:33 am #29670
- August 25, 2018 at 7:50 am #29672WCFM ForumMember
Hi,
Great 🙂
Just change it’s type to “number” –
‘type’ => ‘text’ change this to ‘type’ => ‘number’
Thank You
- August 25, 2018 at 8:06 am #29673MOHOParticipant
Yes it work now!
and i forgot how add “?” icon for my custom field?
- August 25, 2018 at 8:40 am #29678WCFM ForumMember
Please add
'hints' => 'Your message'
to that field and it will show as ‘?’Thank You
- AuthorPosts
- The topic ‘About the position, size, language of custom variation field change’ is closed to new replies.