Input type select for product name

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 Input type select for product name

Viewing 11 reply threads
  • Author
    Posts
    • #17061

      Hi,

      I want to edit the add product page for my vendors. In order to adapt it for my specific application.
      I want to change the text input for “Product Name” into a select input with only the product names I choosed.

      Do you think this is possible ?

      Thank you

    • #17062
      Simha
      Guest

      Hi,

      Thanks for get in touch with us.

      Yeah, absolutely possible.

      Kindly send us few of those names and we will send custom code for that. You just have to add that in your child theme’s functions.php

      Please don’t edit any core files.

      Thank You

    • #17063

      Okay great !

      So the names would be : “Coupe Homme” “Coupe femme” “Brushing” “Coupe enfant”

      Thank you

    • #17070
      WCFM Forum
      Member

      Hi,

      Here is the code for you –

      function wcfm_custom_product_title_type( $general_fields, $product_id, $product_type ) {
      	$product_title_options = array( ""                => "-- Choose Title --",
      																	"Coupe Homme"     => "Coupe Homme",
      																	"Coupe femme"     => "Coupe femme",
      																	"Brushing"        => "Brushing",
      																	"Coupe enfant"    => "Coupe enfant"
      																);
      	if( isset( $general_fields['title'] ) ) {
      	  $general_fields['title']['type'] = 'select';
      	  $general_fields['title']['class'] = 'wcfm-select wcfm_ele wcfm_product_title wcfm_full_ele simple variable external grouped booking';
      	  $general_fields['title']['options'] = $product_title_options;
      	}
      	return $general_fields;
      }
      add_filter( 'wcfm_product_manage_fields_general', 'wcfm_custom_product_title_type', 50, 3 );

      Just see, I have defined your product title names as an array “$product_title_options”, just add your other names there.

      Please know me is this works for you or not!

      Thank You

    • #17083

      Hi,

      Yes this is working very well for me thank you very much !

      Do you think we can extend this to have a complete template with more values linked to this choice for a few products ?

      The idea is to prefill the add product page to give the vendor a better user experience.

      Thank You WC Lovers !

    • #17086
      Simha
      Guest

      Hi,

      Ahh .. that’s great to know that it works as per your requirement.

      Do you think we can extend this to have a complete template with more values linked to this choice for a few products ?

      – Can you please give us a bit more details on this? What actually your vision!
      You already can add more such titles as We have defind a array for that.

      Just relax, any kind of customization possible to acieve.

      Thank You

    • #17094

      Hi,

      Yes I understood that I can now add any product name I want in the array you created. Again thank you very much for that 🙂

      I will try to explain what I have in mind for the add product page.
      As vendors can now choose a name in a list, I wonder if we can do a bigger array with inputs like product name, price, category, duration (WC Appointments) for eg.

      The vendor could choose a product name and inputs like price, duration and category would be automatically prefilled with values.

      For example : “Coupe Homme”(product name) – 15$ (price) – “Homme” (category) – 15min (duration with WC Appointments)

      I hope you understand better what I’m trying to explain.

    • #17113
      Simha
      Guest

      Hi,

      I can’t say that is impossible but that will be a quite big customization.

      Thank You

    • #17170

      Hi,

      Yes I understand.

    • #17289
      WCFM Forum
      Member

      HI,

      Do you want to go for this?

      Just to mention, this will be part of paid customization. If you want to go for this, please know us.

      Thank You

    • #17309

      Hi,

      Okay thank you for this information I am not interrested for the moment, maybe in the future.

    • #17326
      WCFM Forum
      Member

      OK, not an issue.
      Feel free to reach us whenever you are interested in implementing this.

      Thank You

Viewing 11 reply threads
  • The topic ‘Input type select for product name’ is closed to new replies.