hansv Posted January 22, 2016 Share Posted January 22, 2016 Hey everyone I use php-mysql third party booking software. I'm interessed in 1 table where the reservations are saved. Some fields of this table (name, startdate, enddate, amount, address, ...) I would like integrate in a page or ... and with my own additonal PW fields to follow up the reservations. booking-reservation table: PW table name ==> pw_name (only view) startdate ==> pw_startdate (only view) enddate ==> pw_enddate (only view) amount ==> pw_amount (only view) address ==> pw_address (only view) ... additional PW fields persons who will follow up reservation remarks ... How can I populate my PW_fields (pw_name, ...) from my booking-reservation-table-fields (name, ...)? Can this with ProTable (populate the pw_name, ...fields) and what with te additional PW fields? Can I read the booking-reservation-table in a repeater where the pw_name, ... fields are automatic populated by the booking-reservation-table? ... ?? ... ?? All suggestions are welkom Thx Link to comment Share on other sites More sharing options...
adrian Posted January 22, 2016 Share Posted January 22, 2016 It really depends on how you can modify the third party booking software. Potentially you might be able to bootstrap PW into the software's processing script and save the info to PW fields using PW's API. You could use Profields table, or even just child pages - either can be populated via the API. We can help if we know more about how the booking software works. 2 Link to comment Share on other sites More sharing options...
teppo Posted January 22, 2016 Share Posted January 22, 2016 Should also be noted that there are multiple ways around this, depending on the larger context and your needs: If the booking system provides support for event-based actions and you need real-time data for your ProcessWire site, you could do what adrian mentioned above; make the booking software bootstrap ProcessWire and create new pages (or populate ProFields Table field or a custom database table of your own) for your reservations. If the reservation data doesn't have to be real-time and you have proper control over your production environment, you could create a cron job to fetch data from the booking system (assuming that you have access to it via an API or database). If you only need the data for view purposes and have access to the database that third-party booking app populates, you could just use ProcessWire's $database API variable and query it on the fly. The most important considerations here are a) do you need the data to be real-time and b) can you tap into the third-party systems events in order to bootstrap ProcessWire, does it have have a public API you can query, or do you have direct read access to its database. 4 Link to comment Share on other sites More sharing options...
hansv Posted January 22, 2016 Author Share Posted January 22, 2016 How the booking software works I have full rights to modify anything at the booking software: it uses a MVC-framework full access to mysql tables, are imported in database The reservation data has to be real-time so choose option c) from teppo, ProcessWire's $database API variable and query it on the fly. Is there an optimal way? 1) read in ProFields Table and what with the additional fields? 2) use child pages 3) use ? thx adrian and teppo for the ideas, this gives me a boost Link to comment Share on other sites More sharing options...
LostKobrakai Posted January 22, 2016 Share Posted January 22, 2016 This might be interesting to you: https://processwire.com/talk/topic/9320-fieldtype-select-external-option/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now