Okay
  Public Ticket #3536636
Hide vendor until profile picture and banner are set.
Closed

Comments

  •  42
    Anthony O Connell started the conversation

    Hi guys.

    Is their a way I can hide vendors profiles until they set their profile picture and banner. I want to hide profiles who don`t have pictures put up as I find it is off putting to customers when they see blank profiles.

  •  2,214
    WebWizards replied

    Hi Anthony,

    Do you mean to hide them on the page here? https://flexitime.ie/professionals-trainers/ To hide all vendors that either have the default profile pic or default banner?

    I believe I can configure a snippet for that on your site but please confirm for me first if I understood that correctly.


    Kind regards,

    Stefan

  •  42
    Anthony O Connell replied

    Yes hide vendors who have not input a profile picture.

  •  2,214
    WebWizards replied

    You can achieve that by adding the following PHP code snippet to your site:

    add_filter('marketking_vendor_is_inactive', function($inactive, $vendor_id){
        $profile_pic = marketking()->get_store_profile_image_link($vendor_id);
        if (empty($profile_pic)){
            $inactive = true;
        }
        $img = marketking()->get_store_banner_image_link($vendor_id);
        if (empty($img)){
            $inactive = true;
        }
        return $inactive;
    }, 10, 2);
    

    It will remove from the list all vendors that have not set either the profile image or the banner image.

  •  42
    Anthony O Connell replied

    That`s perfect.

    Thank you very much.