[ad_1]
Hello,
Thanks for your detailed message. Thanks to the overrides you can alter the HTML/JS structure of any front-end or back-end page of Vik Booking as you’ve noticed, but it is not possible to execute additional queries to save, for example, additional data for your room. In this case, it is necessary to use a custom WordPress plugin and register to a specific hook that will be fired when clicking the Save button for creating or updating a room.
If you subscribe to the hook vikbooking_before_dispatch you can register a callback function that will be fired whenever a page or a task of Vik Booking is displayed/executed.
With this callback function you should check the request variables to identify the type of task/operation requested (i.e. save/update/delete room). On top of that, you probably want to use some WordPress native functions like is_admin() to make sure you operate only if within the wp-admin section.
Once you have identified the type of action (task or view) through the request variables, you can perform any kind of operation onto the database, to save for example an additional information about your room.
This is how you can save, update or delete custom information without editing any core files. As you’ve noticed, the only solution is to use the hooks fired by our plugin, and so you need a custom WordPress plugins to subscribe to that event (hook).
On a side note, we would like to remind you that Vik Booking is certified as a single-vendor booking engine, in the sense that a portal with multiple owners and properties could not be achieved with our plugin, due to its certification with the complementary Channel Manager service. OTAs would never certify a multi-vendor system as a Channel Manager provider. For the rest, you are free to implement any sort of custom feature you want.
We hope this helps!
The VikWP Team
