Attributes and Required Field with Filter

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 Attributes and Required Field with Filter

Viewing 24 reply threads
  • Author
    Posts
    • #19608
      Arre
      Guest

      Hi,
      u did a great Work i bought ur WCFM Ultimate an all works fine, good job!

      But now ive some questions to the Settings:

      1. Is it Possible to make Attributes as a “Requried Field” so that i can Filter later the products ?
      (I know theres a Function with it but its not possible to Filter it.)

      Ill Explain my Problem and how it should be:

      I want do a Attribute thats called: “Condition” and u can select “New” and “Secondhand”. And later on the Catalog ive a Filter that can Filter the Condition of a Product. I think u know what i mean. And this Attibute should be a Reuqierd Field, so you cant Add the Produkt if u dont Choose the Conditon.

      2. Is it possible to deactivate that user can add attributes?

      I hope u understand my questions, i hope its an easy way …

      Thank you for a job well done.

    • #19616
      WCFM Forum
      Member

      Hi,

      Thanks for get in touch with us and it’s great to know that you have upgraded your WCfM.

      1. I understand your requirement, let me test this a bit and I will know you soon.

      2. Absolutely possible, kindly check WCFM Capability “Add Attribute” and set this OFF.

      Thank You

    • #19630
      Aree
      Guest

      Hi,

      thank you for ur fast answer. Okay i use the WC Marketplace Plugin with your WCFM Ultimate.

      I hope u find a easy way, i think other PPL can use this too.

      And i take a look, but where i can find the Settings for my problem number 2.

    • #19632
      Aree
      Guest

      Okay thx i found the Option… but now ive a new Problem…

      Is it Possible that they can select only in a Attribute 1 Option:

      “Condition”, and then only “New” or “Secondhand” ? At the moment it is “New” and “Secondhand”.

    • #19662
      Bingal
      Guest

      Hi,

      I have just written this code for you. It will serve two of your requirements –

      1. Make the Attributes Required
      2. Change multi selection to single selection (New or Secondhand)

      function product_simple_fields_custom_attributes_manipulate( $select_attributes ) {
      	if( isset( $select_attributes['select_attributes'] ) && isset( $select_attributes['select_attributes']['options'] ) && isset( $select_attributes['select_attributes']['options']['value'] ) ) {
      		$select_attributes['select_attributes']['options']['is_active']['custom_attributes'] = array( 'required' => 1, 'required_message' => 'Condition Attribute is required' );
      	  unset( $select_attributes['select_attributes']['options']['value']['attributes'] );
      	}
      	return $select_attributes;
      }
      add_filter( 'product_simple_fields_custom_attributes', 'product_simple_fields_custom_attributes_manipulate' );

      Kindly add this to your site and know me is this fulfill your requirement or not, I am really exited to know!

      Cheers
      Bingal

    • #19663
      Arre
      Guest

      Hi okay, very nice Support Thank u!
      I answer you !

    • #19664
      Arre
      Guest

      I put this in my functions.php?

    • #19667
      Arre
      Guest

      Okay its work fine, but is it possible that i can choose wich attribute is Reg.?

    • #19668
      Aree
      Guest
      This reply has been marked as private.
    • #19672
      Bingal
      Member

      That’s strange, you are getting ID in catalog?

      Let me check this once.

    • #19679
      Bingal
      Member

      Kindly disable the code for now, I have to do a bit more experiment on this.

      Thanks for your cooperation

      Bingal

    • #19715
      WCFM Forum
      Member

      Hi,

      Here is your updated code, but this will fully functional after WCFM next update –

      function wcfm_restrict_attribute_limit( $limit ) {
      	$limit = 1;
      	return $limit;
      }
      add_filter( 'wcfm_attribute_limit', 'wcfm_restrict_attribute_limit' );
      
      function product_simple_fields_custom_attributes_manipulate( $select_attributes ) {
      	if( isset( $select_attributes['select_attributes'] ) && isset( $select_attributes['select_attributes']['options'] ) && isset( $select_attributes['select_attributes']['options']['value'] ) ) {
      		$select_attributes['select_attributes']['options']['is_active']['custom_attributes'] = array( 'required' => 1, 'required_message' => 'Condition Attribute is required' );
      	}
      	return $select_attributes;
      }
      add_filter( 'product_simple_fields_custom_attributes', 'product_simple_fields_custom_attributes_manipulate' );

      Thank You

    • #19776
      Aree
      Guest

      Okay and can u tell me what are the differents in the next update?

    • #19777
      Aree
      Guest

      Okay ive some more Problems, is its Possible to activate for some Attributes separtly that ppls can write some Attributes and Deactivate some attribute?
      And now with your new code ive the problem again that ive no dropdown, i want that they can choose only 1 attribute not 2 or 3.

      I hope u understand my problem?

    • #19785
      Bingal
      Member

      Hi,

      First of all, this new code will not properly functional till the WCFM next update. WCFM next update will be there on 6th March.

      Okay ive some more Problems, is its Possible to activate for some Attributes separtly that ppls can write some Attributes and Deactivate some attribute?

      – can you please give me a bit more details on this. As I have now made all attributes required for you, I think you don’t want to have this!

      Just to mention, in WCFM next update we are going to add an special feature where you will able to create Attribute group depending upon Categories.

      Thank You
      Bingal

    • #19786
      Aree
      Guest
      This reply has been marked as private.
    • #19787
      Aree
      Guest
      This reply has been marked as private.
    • #19794
      Bingal
      Member

      Hi,

      1. It is an issue in current version, will be fixed in next update
      2. Will do that for for you

      3. You may try alternate Category view from WCFM Admin Settings -> Dashboard -> Disable category checklist

      Thank You

    • #19852
      Bingal
      Member

      Hi,

      WCFM new version is there, now try your code.

      Hope it will do all required magic for you now 🙂

      Thank You

    • #19879
      Aree
      Guest

      Thank u for ur great Support, ill update you soon!

    • #19885
      aree
      Guest

      1. Okay, now with the Categories ive a question? Is it possible to choose only Subcategorys form the Categories?
      2. You dont fixed the problem with the req fields, right?
      3. And is ist possible for Coustomer to do more as 1 Shipping Option?

    • #19891
      Bingal
      Member

      Hi,

      1. Yeah possible, you may do this using CSS or JavaScript easily
      2. All attributes are required, right? It’s done already!
      3. Not getting this clearly.

      Thank You

    • #19951
      aree
      Guest

      I would like to change the category selection menu something so that you only ever a sub category in the category selected before. If I click on bike then I would like that you can then select only the subcategory mountain bike, and not another category. But only choose what you have clicked before.

    • #19958
      Bingal
      Member

      Hi,

      As understand, you want to have only one main category can be selected and sub-category of that are allowed.

      Frankly, these are also possible to achieve but such things are comes under paid customisation.

      If you are interested in this then please contact us directly – https://wclovers.com/contact-us/

      Thank You

    • #19982
      aree
      Guest

      Okay … thank u!

Viewing 24 reply threads
  • The topic ‘Attributes and Required Field with Filter’ is closed to new replies.