Integrate a custom php Backend with WordPress

Customer has existing Wordpress Site. Customer is Medical / Dental practice.

Wants to add features to the site, including:

Check appointment availability
Make an appointment
Change appointment
Cancel appointment (within 30 days)
Make a payment
Schedule a future payment
Cancel a future payment
Add, remove, or modify payment method
Update contact info
Upload / Update / remove documents (images and pdfs)

A different backend will need to be made for the office staff to edit customer info, appointments, and to print reports.

Can I write custom php code to access a different MySQL database (not the WordPress MySQL) on the back end & integrate it with the Word Press site? Or are there existing WordPress "plugins" that provide this kind of functionality?

Thanks
Richard KortsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineNo oneCommented:
The answer to both questions is yes.  The longer answer is that custom code always works (to the ability of the coder).  Plugins exist for all of the desired functions but you may have issues with the details.  In the end, you will probably do a combination of things (custom and plugins).

Check appointment availability
Make an appointment
Change appointment
Cancel appointment (within 30 days)

Look into BirchPress Scheduler, Booking Calendar & Appointment Scheduler, CP Appointment Calendar, and Booking Calendar.  There are free versions of all of these but they also offer paid versions that have more features including payments.

Make a payment
Schedule a future payment
Cancel a future payment

So the first one of these is fairly easy and any number of plugins (including all of the ones above in the pro versions) can do it. Scheduling future payments is less of a plugin function and something more on the gateway side as you won't be storing the payment data locally (at least you shouldn't be to maintain PCI compliance).  So you need to be working with a gateway that supports storing payment data and then the plugin or script needs to know how to trigger a payment.  

I would also seriously investigate the pro versions of the previously listed appointment calendars as it is possible that one of them does all of this for you.

Add, remove, or modify payment method
Update contact info
Upload / Update / remove documents (images and pdfs)

So now you are getting into user management issues and this starts to get significantly more complicated.

Payment methods are tricky because you don't want to store this data in the WordPress database if you can avoid it and instead make the gateway responsible for the security.  So a lot of how you go forward will be determined by your gateway's capabilities.  If they support it (i.e. Authorize.net), I would look for plugins that work with that Gateway before I would write a script using the gateway's API.  Plugins that spring to mind are WooCommerce and Paid Memberships Pro (caveat: not sure if you can use PMP given the rest of the issues).

The upload/update documents is the simplest of all the requirements...all you need is a good form plugin with upload capability (Gravity, Formidable, Ninja can all do it).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richard KortsAuthor Commented:
I am unclear on how to integrate custom code with WordPress; can a wordpress menu item just access xyz.php? Do I have to "manually" construct the look & feel of the WordPress theme in the "non-WordPress" pages?

Thanks
0
Jason C. LevineNo oneCommented:
can a wordpress menu item just access xyz.php

Yes.  Or you can make a new page template in the theme that has the code for xyz.php and that answers the follow-up question.

http://codex.wordpress.org/Page_Templates#Creating_a_Page_Template

Another way to do it is to call WordPress from your custom pages:

<?php
require('../wp-load.php'); // change this to right path, depends on where the custom pages live.  
get_header(); // This gets the Theme's header
?>

Your page content or other code here.

<?php get_footer(); // This gets the footer ?>

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.