wcfm-santa

We've turned 4! Celebrate with us and take away upto 30% off on WCFM Addons.

Claim Offer
03Day 19Hr 47Min 24Sec
wcfm-santa

Attributes

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!

Tagged: 

Viewing 11 reply threads
  • Author
    Posts
    • #52778
      vraugul1
      Participant

      Hello!

      Help please!
      How do I make attribute selection mandatory when adding a product?
      And move the attributes to a more prominent place? (in the panel WCFM)

      Thank you!

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

      Hi,

      Do you want to set all Attributes required?

      Then use this code –

      add_filter( 'wcfm_product_custom_attributes', function( $taxonomy_fields, $att_taxonomy ) {
      	if( isset( $taxonomy_fields[$att_taxonomy] ) && isset( $taxonomy_fields[$att_taxonomy]['options'] ) ) {
      		if( isset( $taxonomy_fields[$att_taxonomy]['options']['is_active'] ) ) {
      			$taxonomy_fields[$att_taxonomy]['options']['is_active']['custom_attributes'] = array( 'required' => 1, 'required_message' => 'Attributes are required' );
      		}
      		if( isset( $taxonomy_fields[$att_taxonomy]['options']['value'] ) ) {
      			$taxonomy_fields[$att_taxonomy]['options']['value']['custom_attributes'] = array( 'required' => 1, 'required_message' => 'Attributes are required' );
      		}
      	}
      	return $taxonomy_fields;
      }, 50, 2);

      Thank You

    • #53415
      vraugul1
      Participant

      Hello!

      How to make mandatory filling of attributes, relative to a certain category of goods?
      First, the vendor selects a category, and then there are attributes relative to the category.

      Thank you!

    • #53416
      WCFM Forum
      Keymaster

      Hi,

      There is no category-attributes relationship, so this will not work.

      Thank You

    • #53417
      vraugul1
      Participant

      Hello!

      Is it possible to create this relationship (category-attributes)?

      Thank you!

    • #53568
      WCFM Forum
      Keymaster

      Possibly! But lots of custom coding require for this.

      Thank You

    • #53682
      vraugul1
      Participant

      Hello!

      This is understandable
      Can you make it?

      Thank you!

    • #54357
      Craig
      Participant

      I think the only mandatory setting is that you can can require that “a” category must be selected but not which one within the list or if the children within the parent category must be selected as well.

      If this is important you might want to consider simplifying your category structure. I would think that the deeper levels of children attached to the parent category is you are going to experience more drop off of the selection because it is too detailed.

    • #54567
      WCFM Forum
      Keymaster

      Hi,

      Can you make it?

      – We are working on this, will be there soon!

      Thank you

    • #56127
      premiersoft
      Participant

      Hi,

      I’m waiting for this also, my vendors require it very much.
      I also think that it should work something like:
      a) Select category ( if none selected you can’t choose any attributes)
      b) Select attributes for that specific category

      Also, can you implement choosing some ‘mandatory’ attributes to be added?
      Thank you and waiting very tight on this implementation.

    • #58371
      acauaferreira
      Participant

      Yes I Agree about this, i will also love a lot.

    • #58522
      WCFM Forum
      Keymaster

      We are working on this, will be there on next update.

      Thank You

Viewing 11 reply threads
  • The topic ‘Attributes’ is closed to new replies.