Franchise drop down

This topic contains 3 replies, has 3 voices, and was last updated by  lisec73 5 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #465707

    lisec73
    Full Member
    Post count: 180

    Hi,
    It is all starting to come together and GD v2 is great and has so many more functions that I like.

    I have a couple of niggly things that I can’t quite figure out.

    The Franchise lock fields drop down: is it possible to exclude somewhere “Verified Listing” and “Get Directions” from the drop-down.

    The idea is that when the main listing is verified, then all subsequent listings should automatically inherit without that needing to be either locked or filled in for subsequent listings.

    For “Get Directions”, I have set that to be for admin only to change as I want all listings to get that option. I don’t want to confuse users.

    The option to name the Franchise field as appropriate is great. Once a listing has activated the re-named Franchise option, they are still asked in the sidebar to “Add Franchise”. This is a bit confusing when, in my case, they have put in that they have several “School Campuses”.

    Thanks
    Lise

    #465716

    Guust
    Moderator
    Post count: 29970

    I alerted the Franchise developer to have a look at your questions. Thanks

    #466007

    Kiran
    Moderator
    Post count: 7069

    Hello Lise,

    If the fields not displayed in locked fields list then user can’t set to auto value set for the franchises for those fields.

    You can use following code snippet to skip fields from locked fields list.

    
    
    /**
     * Skip field to display in franchise locked fields list.
     */
    function gd_snippet_franchise_input_franchise_fields_options( $options, $field_options, $field, $package_id, $default ) {
    	if ( empty( $options ) ) {
    		return $options;
    	}
    
    	//if ( $field['post_type'] == 'gd_place' ) { // For particular CPT
    		 // Skip 'claimed'
    		if ( isset( $options['claimed'] ) ) {
    			unset( $options['claimed'] );
    		}
    
    		 // Skip 'get_directions'
    		if ( isset( $options['get_directions'] ) ) {
    			unset( $options['get_directions'] );
    		}
    	//}
    
    	return $options;
    }
    add_filter( 'geodir_franchise_input_franchise_fields_options', 'gd_snippet_190129_franchise_input_franchise_fields_options', 10, 5 );

    Thanks,
    Kiran

    #466152

    lisec73
    Full Member
    Post count: 180

    That will do the trick. Great, thanks
    Lise

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket