It's need to create a plugin that, in the place of a shortcode with a set of variables, should display the event schedule and open the iframe from url to the page for selling tickets at the service of our partners.
The shortcode must contain the parameters:
- Event ID - movie_id
- Object ID - cinema_id
- place_name - the name of object to display
- Theme - dark / white
Sample shortcode content:
[megamag cinema_id="78750", place_name=''cinema October', movie_id = "28752, theme="dark"]
At the place of the shortcode should show the schedule of the event at the facility, defined by the parameters like on the images files. Improvements in appearance are welcome. The images are schematic and are given as an example.
- When you click on the session time in the desktop version, a frame should open with a link to the ticket sale page as on the site of our partners.
We have te source code of the script for opening the frame.
- When you click on the session time in the mobile version, a link to the ticket sales page should open in a new tab.
Where to get the data:
All current sessions are available by reference.
[login to view URL]
Returns an array of objects in json
cinema_id: "78750", // Cinema ID
template_name: "Auditorium", // Hall name
movie_id: "28752", // Event ID
movie_name: "Carius and Bactus or Tooth Fairy Tale (6+)", // The name of the movie
session_id: "641_642_215088_1130577", // Not Used
new_session_id: "1130577", // Session ID
datetime: "2019-04-13 12:00:00", // Session Time
price: "5.00", // Minimum price
in_3D: false // Sign of a 3D movie or not
Based on the data in the JSON file and the parameters in the shortcode - you need to create and display the event schedule at the site on the shortcode site, as well as generate links that will open in the frame when you click on the session time.
Link to open widget:
[login to view URL]
The frequency of updating data must be made in the plugin settings.