Fooevents – Product Type Specific Category Setup

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 – Feature Request Fooevents – Product Type Specific Category Setup

Tagged: 

Viewing 8 reply threads
  • Author
    Posts
    • #81942
      kaloomee
      Participant

      HI
      1 – With Woocommerce subscriptions I am able to set Product Type Specific Categories in ‘Product Type Specific Category Setup’
      Example – Set to :- Any product listed as a ‘Product type’ ‘subscription’ can only be located in custom category ‘Subscriptions’.

      How is this achievable with events? – I would like so that if a listing is an event, it can only be listed in category ‘Events’

    • #82437
      WCFM Forum
      Keymaster

      Hi,

      Well, certainly “Event” is not a product type. It’s just a product specific option.

      So, this is not possible for this!

      Thank You

    • #82532
      kaloomee
      Participant

      OKay,
      So….Is their any code you can supply to achieve this please

      Would not want an event to be mislocated or placed in shirts for example
      I would like so that if a listing is an event, it can only be listed in category ‘Events’

    • #82824
      WCFM Forum
      Keymaster

      Hi,

      I would like so that if a listing is an event, it can only be listed in category ‘Events’

      – Well, we can handle this other way!

      On save we can check whether it’s an even product or not and associate with right category or not?

      Kindly know me your site’s “Event” category ID for the purpose.

      Thank You

    • #82849
      kaloomee
      Participant

      Excellent news

      Events category ID is – 367

      Thank you

    • #82947
      WCFM Forum
      Keymaster

      Hi,

      Please add this code to your site –

      add_action( 'after_wcfm_products_manage_meta_save', function( $new_product_id, $wcfm_products_manage_form_data ) {
      	if(isset($wcfm_products_manage_form_data['WooCommerceEventsEvent'])) {
      		$WooCommerceEventsEvent = $wcfm_products_manage_form_data['WooCommerceEventsEvent'];
      		if( $WooCommerceEventsEvent == 'Event' ) {
      			wp_set_object_terms( $new_product_id, 367, 'product_cat' );
      		}
      	}	
      }, 60, 2 );

      Thank You

    • #82954
      kaloomee
      Participant

      Thank you
      Can you briefly explain how What this does
      I have added the code
      Then started to create a new events
      Add new product > event tab = yes but still see the categories tab
      I am sure that this works but would like to be able to explain to vendors in the’How to create an event’ help doc that I am creating.

    • #83311
      WCFM Forum
      Keymaster

      Hi,

      This code will ensure if a product added as “Event” then it will definitely associated with “Event” category.

      Vendor may select any category by mistake, but this will discard those and added only Event category to the product.

      Thank You

    • #83391
      kaloomee
      Participant

      Thank you for explanation – Much appreciated

Viewing 8 reply threads
  • You must be logged in to reply to this topic.