How can I grab variables from Appointment+

Hi,

How can I grab some variables and strings from Appointment+ such as:
1) initial time of appointment for Person1
2) end time of appointment for Person1
3) initial time of appointment for Person2
4) name of Person1
5) time that work starts that day

  • Tyler Postle

    Hey Enrique,

    Welcome to the WPMU DEV Community! Hope you're doing well today.

    I'll need to call in one of our developers who will be able to provide some info on this for you. Could you give an example of what you are wanting to do exactly here? That could help our devs provide the best solution for your needs.

    I'm wondering because clients can have multiple appointments so I'm not sure what you're expecting with the initial time and end time of appointments.

    Once you've explained your needs a little further here then I can flag one of our developers to help you out.

    Look forward to hearing back.

    Cheers,
    Tyler

  • Enrique

    Hi Tyler,

    Thanks for your prompt response. Let me give you an example. Let say that on Monday, there are 10 appointments registered in the calendar of Appointment+. There has to be some table or variable that is storing:
    1) at what time work starts that day
    2) initial time of appointment for Person1
    3) end time of appointment for Person1
    4) name of Person1, etc.
    5) initial time of appointment for Person2
    6) name of Person2, etc.
    Just need to know in which of the files that information is stored and the names of those variables or table. I am just trying to keep it simple.

  • Jose

    Hello there @Enrique,

    Hope you are doing great.

    The simplest way to get the information that you need is by using the method get_reserve_apps defined in appointments.php.
    It will return all the reserved appointments for the specified parameters. Then you can iterate over the result. Each appointment contains the details that you need.
    Basically, this is the way to use it from your custom plugin or from your functions.php file:

    global $appointments;
    $apps = $appointments->get_reserve_apps($location, $service, $provider, $week);

    Looking into the code will give you a better understanding of how to use it.

    Don't hesitate to ask if you have further questions.

    Cheers,
    José

  • Enrique

    Hi Jose,

    Hope you are doing well. I am still troubleshooting/debugging my code so I should have more info soon with regards to the get_reserve_apps. But maybe you can help me with a something that should be really simple.
    Although I like the plugin, I am not a big fan of the formatting of the table. It just looks as something old. I am trying to use the front.css but it is showing as (inactive) in my wordpress. So I am trying to add some simple css to the "Addtional CSS Rule" in Settings, and that is not working. Maybe you might catch what I am doing wrong. Attached is a photo of the colors, radius, and box shadow I would like the table to have. At the very least, I am trying to get the radius and the box shadow. Any idea how to get the radius and box shadow at least? This is the CSS I got by going to http://www.csstablegenerator.com:
    .CSSTableGenerator {
    margin:0px;padding:0px;
    width:100%;
    box-shadow: 10px 10px 5px #888888;
    border:1px solid #000000;

    -moz-border-radius-bottomleft:5px;
    -webkit-border-bottom-left-radius:5px;
    border-bottom-left-radius:5px;

    -moz-border-radius-bottomright:5px;
    -webkit-border-bottom-right-radius:5px;
    border-bottom-right-radius:5px;

    -moz-border-radius-topright:5px;
    -webkit-border-top-right-radius:5px;
    border-top-right-radius:5px;

    -moz-border-radius-topleft:5px;
    -webkit-border-top-left-radius:5px;
    border-top-left-radius:5px;
    }.CSSTableGenerator table{
    border-collapse: collapse;
    border-spacing: 0;
    width:100%;
    height:100%;
    margin:0px;padding:0px;
    }.CSSTableGenerator tr:last-child td:last-child {
    -moz-border-radius-bottomright:5px;
    -webkit-border-bottom-right-radius:5px;
    border-bottom-right-radius:5px;
    }
    .CSSTableGenerator table tr:first-child td:first-child {
    -moz-border-radius-topleft:5px;
    -webkit-border-top-left-radius:5px;
    border-top-left-radius:5px;
    }
    .CSSTableGenerator table tr:first-child td:last-child {
    -moz-border-radius-topright:5px;
    -webkit-border-top-right-radius:5px;
    border-top-right-radius:5px;
    }.CSSTableGenerator tr:last-child td:first-child{
    -moz-border-radius-bottomleft:5px;
    -webkit-border-bottom-left-radius:5px;
    border-bottom-left-radius:5px;
    }.CSSTableGenerator tr:hover td{

    }
    .CSSTableGenerator tr:nth-child(odd){ background-color:#aad4ff; }
    .CSSTableGenerator tr:nth-child(even) { background-color:#ffffff; }.CSSTableGenerator td{
    vertical-align:middle;

    border:1px solid #000000;
    border-width:0px 1px 1px 0px;
    text-align:left;
    padding:12px;
    font-size:10px;
    font-family:Arial;
    font-weight:normal;
    color:#000000;
    }.CSSTableGenerator tr:last-child td{
    border-width:0px 1px 0px 0px;
    }.CSSTableGenerator tr td:last-child{
    border-width:0px 0px 1px 0px;
    }.CSSTableGenerator tr:last-child td:last-child{
    border-width:0px 0px 0px 0px;
    }
    .CSSTableGenerator tr:first-child td{
    background:-o-linear-gradient(bottom, #007fff 5%, #56aaff 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #007fff), color-stop(1, #56aaff) );
    background:-moz-linear-gradient( center top, #007fff 5%, #56aaff 100% );
    filter:progid:smiley:XImageTransform.Microsoft.gradient(startColorstr="#007fff", endColorstr="#56aaff":wink:; background: -o-linear-gradient(top,#007fff,56aaff);

    background-color:#007fff;
    border:0px solid #000000;
    text-align:center;
    border-width:0px 0px 1px 1px;
    font-size:14px;
    font-family:Georgia;
    font-weight:bold;
    color:#ffffff;
    }
    .CSSTableGenerator tr:first-child:hover td{
    background:-o-linear-gradient(bottom, #007fff 5%, #56aaff 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #007fff), color-stop(1, #56aaff) );
    background:-moz-linear-gradient( center top, #007fff 5%, #56aaff 100% );
    filter:progid:smiley:XImageTransform.Microsoft.gradient(startColorstr="#007fff", endColorstr="#56aaff":wink:; background: -o-linear-gradient(top,#007fff,56aaff);

    background-color:#007fff;
    }
    .CSSTableGenerator tr:first-child td:first-child{
    border-width:0px 0px 1px 0px;
    }
    .CSSTableGenerator tr:first-child td:last-child{
    border-width:0px 0px 1px 1px;
    }

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.