Booking Calendar does not show calendar
-
The plugin conflicts in some way with jQuery. Result is that the calendar does not appear. I am not sure how to fix this, even the free version should work as it says it does. There is an FAQ with depths saying that it’s caused by some javascript conflict, but it does not tell you how to solve it.
I’ve found various sites with different advice, but am still at a loss how to fix their plugin, so will move onto either APPOINTY plugin, or WEBRESRV instead.
-
I don’t know if this might be the right place to research but I’ve found this resource:
and this resource, but I’m not sure which files to edit, where to place the .noconflict() and what files to create to get this working
https://jquery-howto.blogspot.com/2009/07/jquerynoconflict-resolving-conflicts.html
FIXED!! ok so here on the support FAQ is something to help you first of all find the error (likely to be some javascript from another plugin or even your theme):
Why calendar is not show, but booking form is visible ?This situation can be, when some other JS script (from some other plugin or active theme) is generate JavaScript error. You can check if you page have errors at the IE at the status bar or at Firefox using Console2 addon. So you need to fix that JavaScript error, or deactivate plugin or theme, which is generate that error. After this Booking Calendar will show up.
I used it to find this error, which looks like it’s coming from WP-ecommerce plugin:
Error: jQuery(“form.product_form”).livequery is not a function
Source file: https://djhymn.com/wp-content/plugins/wp-e-commerce/wpsc-core/js/wp-e-commerce.js?ver=3.8.4.391083
Line: 273apparantly the wp-ecommerce scripts are loaded on every page – that they don’t even need to be on.
IF you are using WP commerce with this plugin, then here’s a hack to make it work:
go to /wpsc-includes/theme.functions.php, and comment out ALL the call to jQuery:
`/* this should comment out all the jQuery loading…
wp_enqueue_script( ‘jQuery’ );
wp_enqueue_script( ‘wp-e-commerce’, WPSC_CORE_JS_URL . ‘/wp-e-commerce.js’, array( ‘jquery’ ), $version_identifier );
wp_enqueue_script( ‘infieldlabel’, WPSC_CORE_JS_URL . ‘/jquery.infieldlabel.min.js’, array( ‘jquery’ ), $version_identifier );
wp_enqueue_script( ‘wp-e-commerce-ajax-legacy’, WPSC_CORE_JS_URL . ‘/ajax.js’, false, $version_identifier );
wp_enqueue_script( ‘wp-e-commerce-dynamic’, $siteurl . “/index.php?wpsc_user_dynamic_js=true”, false, $version_identifier );
wp_localize_script( ‘wp-e-commerce-dynamic’, ‘wpsc_ajax’, array( ‘ajaxurl’ => admin_url( ‘admin-ajax.php’ ) ) );
wp_enqueue_script( ‘livequery’, WPSC_URL . ‘/wpsc-admin/js/jquery.livequery.js’, array( ‘jquery’ ), ‘1.0.3’ );
wp_enqueue_script( ‘jquery-rating’, WPSC_CORE_JS_URL . ‘/jquery.rating.js’, array( ‘jquery’ ), $version_identifier );
wp_enqueue_script( ‘wp-e-commerce-legacy’, WPSC_CORE_JS_URL . ‘/user.js’, array( ‘jquery’ ), WPSC_VERSION . WPSC_MINOR_VERSION );
if ( get_option( ‘show_thumbnails_thickbox’ ) == 1 ){
$lightbox = get_option(‘wpsc_lightbox’, ‘thickbox’);
if( $lightbox == ‘thickbox’ ) {
wp_enqueue_script( ‘wpsc-thickbox’, WPSC_CORE_JS_URL . ‘/thickbox.js’, array( ‘jquery’ ), ‘Instinct_e-commerce’ );
wp_enqueue_style( ‘wpsc-thickbox’, WPSC_CORE_JS_URL . ‘/thickbox.css’, false, $version_identifier, ‘all’ );
} elseif( $lightbox == ‘colorbox’ ) {
wp_enqueue_script( ‘colorbox-min’, WPSC_CORE_JS_URL . ‘/jquery.colorbox-min.js’, array( ‘jquery’ ), ‘Instinct_e-commerce’ );
wp_enqueue_script( ‘wpsc_colorbox’, WPSC_CORE_JS_URL . ‘/wpsc_colorbox.js’, array( ‘jquery’, ‘colorbox-min’ ), ‘Instinct_e-commerce’ );
wp_enqueue_style( ‘wpsc-colorbox-css’, WPSC_CORE_JS_URL . ‘/wpsc_colorbox.css’, false, $version_identifier, ‘all’ );
}
}
wp_enqueue_style( ‘wpsc-theme-css’, wpsc_get_template_file_url( ‘wpsc-‘ . get_option( ‘wpsc_selected_theme’ ) . ‘.css’ ), false, $version_identifier, ‘all’ );
wp_enqueue_style( ‘wpsc-theme-css-compatibility’, WPSC_CORE_THEME_URL . ‘compatibility.css’, false, $version_identifier, ‘all’ );
wp_enqueue_style( ‘wpsc-product-rater’, WPSC_CORE_JS_URL . ‘/product_rater.css’, false, $version_identifier, ‘all’ );
wp_enqueue_style( ‘wp-e-commerce-dynamic’, $siteurl . “/index.php?wpsc_user_dynamic_css=true&category=$category_id”, false, $version_identifier, ‘all’ );*/`
then go to your theme header.php file and replace the code you just commented out, introducing their source urls as well like this:
<?php if( is_page(array('products-page','donate','checkout','transaction-results','your account')) || is_post_type_archive('wpsc-product') || 'wpsc-product' == get_post_type() ) : global $wp_styles, $wpsc_theme_url, $wpsc_theme_path; $WPSC_URL = get_bloginfo('url')."/wp-content/plugins/wp-e-commerce"; $WPSC_CORE_JS_URL = get_bloginfo('url')."/wp-content/plugins/wp-e-commerce/wpsc-core/js"; $WPSC_CORE_THEME_URL = get_bloginfo('url')."/wp-content/plugins/wp-e-commerce/wpsc-theme"; wp_enqueue_script( 'jQuery' ); wp_enqueue_script( 'wp-e-commerce', WPSC_CORE_JS_URL . '/wp-e-commerce.js', array( 'jquery' ), $version_identifier ); wp_enqueue_script( 'infieldlabel', WPSC_CORE_JS_URL . '/jquery.infieldlabel.min.js', array( 'jquery' ), $version_identifier ); wp_enqueue_script( 'wp-e-commerce-ajax-legacy', WPSC_CORE_JS_URL . '/ajax.js', false, $version_identifier ); wp_enqueue_script( 'wp-e-commerce-dynamic', $siteurl . "/index.php?wpsc_user_dynamic_js=true", false, $version_identifier ); wp_localize_script( 'wp-e-commerce-dynamic', 'wpsc_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); wp_enqueue_script( 'livequery', WPSC_URL . '/wpsc-admin/js/jquery.livequery.js', array( 'jquery' ), '1.0.3' ); wp_enqueue_script( 'jquery-rating', WPSC_CORE_JS_URL . '/jquery.rating.js', array( 'jquery' ), $version_identifier ); wp_enqueue_script( 'wp-e-commerce-legacy', WPSC_CORE_JS_URL . '/user.js', array( 'jquery' ), WPSC_VERSION . WPSC_MINOR_VERSION ); if ( get_option( 'show_thumbnails_thickbox' ) == 1 ){ $lightbox = get_option('wpsc_lightbox', 'thickbox'); if( $lightbox == 'thickbox' ) { wp_enqueue_script( 'wpsc-thickbox', WPSC_CORE_JS_URL . '/thickbox.js', array( 'jquery' ), 'Instinct_e-commerce' ); wp_enqueue_style( 'wpsc-thickbox', WPSC_CORE_JS_URL . '/thickbox.css', false, $version_identifier, 'all' ); } elseif( $lightbox == 'colorbox' ) { wp_enqueue_script( 'colorbox-min', WPSC_CORE_JS_URL . '/jquery.colorbox-min.js', array( 'jquery' ), 'Instinct_e-commerce' ); wp_enqueue_script( 'wpsc_colorbox', WPSC_CORE_JS_URL . '/wpsc_colorbox.js', array( 'jquery', 'colorbox-min' ), 'Instinct_e-commerce' ); wp_enqueue_style( 'wpsc-colorbox-css', WPSC_CORE_JS_URL . '/wpsc_colorbox.css', false, $version_identifier, 'all' ); } } wp_enqueue_style( 'wpsc-theme-css', wpsc_get_template_file_url( 'wpsc-' . get_option( 'wpsc_selected_theme' ) . '.css' ), false, $version_identifier, 'all' ); wp_enqueue_style( 'wpsc-theme-css-compatibility', WPSC_CORE_THEME_URL . 'compatibility.css', false, $version_identifier, 'all' ); wp_enqueue_style( 'wpsc-product-rater', WPSC_CORE_JS_URL . '/product_rater.css', false, $version_identifier, 'all' ); wp_enqueue_style( 'wp-e-commerce-dynamic', $siteurl . "/index.php?wpsc_user_dynamic_css=true&category=$category_id", false, $version_identifier, 'all' ); endif; ?>
and then – the javascript error dissappears because we’re only calling the .livequery scripts for e-commerce on the pages that require it!
So the calendar form plugin starts working, and there is no more jQuery conflicts.woohoo that took me a day to solve!
- The topic ‘Booking Calendar does not show calendar’ is closed to new replies.