I sat down and looked at it again, and found a way to implement this.
At first I tried to use the fullcalendar Drupal plugin, but it turned out to be unnecessarily complicated for this particular function, plus it was not entirely clear how to add the fullcalendar plugin output to the panel. In addition, additional trading opportunities were not useful in this case either.
So here is what I did:
1) I created a module in which I set up a user panel. Here is the part of the module that configured the trade verification panel:
function custom_checkout_commerce_checkout_pane_info() { $panes = array( 'custom_checkout_date' => array( 'title' => t('Select a date'), 'base' => 'custom_checkout_date_pane', 'page' => 'route_date',
Here, what is included in the panel:
function custom_checkout_route_date_pane_checkout_form($form, &$form_state, $checkout_pane, $order) { $pane_form['route_calendar'] = array( '#type' => 'container', '#id' => 'route_calendar' ); $pane_form['selected_date'] = array( '#type' => 'hidden', '#id' => 'selected_date' ); return $pane_form; }
The hidden field "selected_date" stores the result of the calendar, which is then added to the order.
Then I added fullcalendar to the Drupal library folder and added it to the page where the fullcalendar panel is located using drupal_add_js .
Then I created an AJAX callback page, which is used to return the available dates that match the parameters specified in the order by the customer.
Then I added a click handler for each event, overriding the Fullcalendar eventClick callback . Thus, when a user clicks on an event, he sets the date of the event in a hidden field and sends the current trading verification area, moving to the next one.
So I finally figured out what to do, but it took a lot of work to do, and many of the parts I did were not well documented or had any good examples:
In any case, the problem in this matter is now resolved, I hope this helps anyone who is trying to solve the same (or similar) problems with the Drupal checkout part.