appointments shotcodes

what am i doing wrong ?

i need to show for a service provider just the thumbnail ... but no description ..

the user has a bio page with a thumbnail and description ..

this is my code

[app_service_providers autorefresh="1" select="Choose your Therapist" thumb_size="thumbnail" description="none" order_by="name"]

thanks

  • yo_luca
    • Site Builder, Child of Zeus

    also wonder if there is a way to show only some services ..

    [app_services] maybe add servicesID="1,2,3"

    this can be done to filter the providers ... but not services

    would be nice if i can filter what services to show

  • Hakan
    • The Incredible Smush

    Hi,

    Maybe explanation is not clear, but there is no "Only thumbnail but no description" option. And there is no need for that, because a thumbnail is (usually) a featured image of a page and description is the page content. So just add a featured image to the bio page and simply leave the content empty.

    [app_services] maybe add servicesID="1,2,3"

    Possible with using app_services filter around line 1480. Such important changes are done using filter hooks.

    Cheers,
    Hakan

  • yo_luca
    • Site Builder, Child of Zeus

    Hakan

    thank for your reply ..

    thats what i did ... [app_service_providers autorefresh="1" description="none" thumb_size="full" order_by="name"]

    and yes .. that provider has a featured image set ...

    but still no image

  • yo_luca
    • Site Builder, Child of Zeus

    thank you very much .

    other annoying thing ..

    is there a way to make everything still ? ... like .. if i select a service with its own description ... might be bigger then the other ... when page refreshes .. its very annoying looking at it ...

    also ... there not be a provider selected already ... rather then say " choose " .

    because without one selected the page is small ... soon you select one ... again page gets big ....

    please take a look at my test site

    http://anunturiuk.com/test/masaj/make-an-appointment/

  • Hakan
    • The Incredible Smush

    is there a way to make everything still ? ... like .. if i select a service with its own description ... might be bigger then the other ... when page refreshes .. its very annoying looking at it ...

    Then don't use autorefresh. Or fit thumbnail sizes to be the same (Don't use full).

    also ... there not be a provider selected already ... rather then say " choose " .

    The default "no preference" does not mean Choose. Who changed it as Choose?

    Organize the page and take service provider shortcode to another row in the table. That is a standard WordPress page. You can do any edits there. That is why we have several shortcodes instead of a single one.

  • Alexander
    • DEV MAN’s Mascot

    Both I suppose. I was more asking to see if you were able to implement the solutions Hakan recommended, or if you needed additional help. I'm glad to hear you were able to get things in order! If you need anything else, feel free to open a new thread with your question, or if it's related to this discussion you can just mark it unresolved and reply.

    Best regards,
    Alexander Rohmann

  • yo_luca
    • Site Builder, Child of Zeus

    original question is solved the thumbnail issue ...

    i still need to automatically select an available provider

    here is the code Hakan posted on other topic

    function assign_random_provider( $app_id ) {
    global $wpdb, $appointments;
    $a = $appointments;
    if ( !is_object($a) )
    return;
    // Get appointment
    $app = $wpdb->get_row( 'SELECT * FROM ' . $a->app_table. ' WHERE ID='.$app_id. ' ' );
    // Check if a provider is already assigned
    if ( !$app || 0 != $app->worker )
    return;
    // Find providers who can give this service
    $workers=$a->get_workers_by_service( $app->service );
    if ( !$workers || empty($workers) )
    return;
    // Randomize
    shuffle($workers);
    // Find timestamp
    $start = strtotime( $app->start );
    $end = strtotime( $app->end );
    // Check each worker for being busy or not working
    foreach ($workers as $worker){
    $apps = $a->get_reserve_apps_by_worker( 0, $worker->ID );
    $busy = false;
    if ( $apps ) {
    	foreach ( $apps as $_app ) {
    		if ( $start >= strtotime( $_app->start ) && $end <= strtotime( $_app->end ) ) {
    			$busy = true;
    			break;
    		}
    	}
    }
    if ( $busy || $a->is_break($start,$end,$worker->ID))
    continue;
    // We found a free provider
    $result=$wpdb->update( $a->app_table, array('worker'=>$worker->ID),array('ID'=>$app_id) );
    if ( $result )
    wp_mail( $a->get_worker_email($worker->ID),'New appointment', 'You have been assigned a new appointment on '. mysql2date($a->datetime_format, $app->start));
    }
    }
    add_action( 'app_new_appointment', 'assign_random_provider' );

    its not working for me ...

  • Alexander
    • DEV MAN’s Mascot

    Ok, I can try to help you narrow down the problem. First a few questions:

    How and where did you implement the code? Are you getting any error messages? Does the shortcode continue the way it normally would without this modification?

    Best regards,
    Alexander Rohmann

  • yo_luca
    • Site Builder, Child of Zeus

    i added the code to function.php

    no error messages ...

    shortcode does continue the way it normally would without this modification? ... like there is nothing added to functions .php

    i know that i add this to the correct file and corect way because i added code for html emails and works

    thanks

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.