Use of users custom fields in a product search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Use of users custom fields in a product search

This topic contains 19 replies, has 2 voices, and was last updated by T0mX06 T0mX06 3 years, 11 months ago.

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #27155
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    That is actually very helpful. Maybe this variation:

    add_filter( 'asp_results', 'asp_custom_images_gr', 10, 4 );
    function asp_custom_images_gr( $results, $id, $is_ajax, $args ) {
    	global $WCFM, $WCFMmp;
    	foreach ($results as $k=>&$r) {
    		if ( $r->content_type == 'user' ) {
    			$store_user = wcfmmp_get_store( $r->id );
    			$r->image = $store_user->get_avatar();
    		}
    	}
    
    	return $results;
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #27159
    T0mX06
    T0mX06
    Participant

    It works ! Perfect as usual ! Thank you so much 🙂

    #27165
    T0mX06
    T0mX06
    Participant

    One last question (i hope for you :))
    How can I add in the custom code for displaying user metas in product search a metadatas included in another one. For example if i want to display the content of _enable_local_pickup wich is in _wcfmmp_shipping_by_distance => array etc.

    _wcfmmp_shipping_by_distance
    array (
    0 =>
    array (
    ‘_default_cost’ => ”,
    ‘_max_distance’ => ”,
    ‘_free_shipping_amount’ => ”,
    ‘_enable_local_pickup’ => ‘yes’,
    ‘_local_pickup_cost’ => ‘5’,
    ),
    )

    #27180
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Well, this is more difficult, it cannot be used via the advanced title/content fields. This requires a completely new custom code.
    Unfortunately I cannot custom code this one for your, as it is very specific of what and how do you want to display. This tutorial and the previous codes could be a good start on how to do it.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #27186
    T0mX06
    T0mX06
    Participant

    I understand that. Thanks for everything. Have a nice Week End

Viewing 5 posts - 16 through 20 (of 20 total)

The topic ‘Use of users custom fields in a product search’ is closed to new replies.