• Resolved damianpietroszek

    (@damianpietroszek)


    Can i set shortcode so that at the shortcode appeared immediately calendar for selecting a date to book. Now when when I use the shortcode on my website the first thing is the button that Sambady must click and next to jump out the calender

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Webba Appointment Booking

    (@webba-agency)

    Hello,

    Could you provide a link to the page on your website?

    Thread Starter damianpietroszek

    (@damianpietroszek)

    My link is:

    https://bmconference.com/rozmowa-biznesowa/

    button value: Wybierz date i godzin?

    I wanna replace button on the calendar start in the page

    Plugin Author Webba Appointment Booking

    (@webba-agency)

    Hi,
    There is no option for auto popup calendar in the current version. But this can be achieved with a simple fix.

    You’d need to to edit wp-content/plugins/webba-booking/frontend/js/wbk-frontend.js

    replace:

    // onload function
    jQuery(function ($) {
    	if( jQuery('.wbk-payment-init').length > 0 ){
     		wbk_set_payment_events();
    	}
     	if( jQuery('#wbk-cancel_booked_appointment' ).length > 0 ){
     		wbk_cancel_booked_appointment_events();
    	}
    
     
    	if( jQuery('#wbk-service-id').length == 0 ){
    
    	    return;
        }
    	var service_id = jQuery('#wbk-service-id').val();
    	if ( wbkl10n.mode == 'extended' ){
    		if ( service_id == 0 ) {
    			wbk_total_steps = 4;
    	 		wbk_setServiceEvent();
    	 	} else {
    	 		wbk_total_steps = 3;
    	 		wbk_renderSetDate( false );
    		}
    	} else {
    		if ( service_id == 0 ) {
    			wbk_total_steps = 3;
    	 		wbk_setServiceEvent();
    	 	} else {
    	 		wbk_total_steps = 2;
    	 		wbk_renderSetDate( false );
    		}
    		jQuery('#timeselect_row').remove();
    	} 
    	 
    });

    with:

    // onload function
    jQuery(function ($) {
    	if( jQuery('.wbk-payment-init').length > 0 ){
     		wbk_set_payment_events();
    	}
     	if( jQuery('#wbk-cancel_booked_appointment' ).length > 0 ){
     		wbk_cancel_booked_appointment_events();
    	}
    
     
    	if( jQuery('#wbk-service-id').length == 0 ){
    
    	    return;
        }
    	var service_id = jQuery('#wbk-service-id').val();
    	if ( wbkl10n.mode == 'extended' ){
    		if ( service_id == 0 ) {
    			wbk_total_steps = 4;
    	 		wbk_setServiceEvent();
    	 	} else {
    	 		wbk_total_steps = 3;
    	 		wbk_renderSetDate( false );
    		}
    	} else {
    		if ( service_id == 0 ) {
    			wbk_total_steps = 3;
    	 		wbk_setServiceEvent();
    	 	} else {
    	 		wbk_total_steps = 2;
    	 		wbk_renderSetDate( false );
    		}
    		jQuery('#timeselect_row').remove();
    	} 
    	jQuery('#wbk-date').trigger('click');
    });
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘using shortcode service’ is closed to new replies.