Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1053123

    scvizar
    Participant

    Hello, I’m trying to add a booking engine to the website I’m working on, but then I get some errors on the page.
    The code is

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
            <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

    the error is:

    Revolution Slider Error: You have some jquery.js library include that comes after the revolution files js include.
    This includes make eliminates the revolution slider libraries, and make it not work.

    To fix it you can:
    1. In the Slider Settings -> Troubleshooting set option: Put JS Includes To Body option to true.
    2. Find the double jquery.js include and remove it.

    As you can see on the attached file I added this code on the functions.php file on my child theme:

    function my_custom_head_output() { ?>
    
     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
            <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
            <script type="text/javascript" src="globalize/globalize-it.js"></script>
    
    <?php }

    add_action( ‘wp_head’, ‘my_custom_head_output’ );

    I need help please…

    #1053270

    Darshana
    Moderator

    Hi there,

    Thanks for writing in! jQuery libraries are already included to the theme and you don’t need to add it again.

    Hope that’s clear.

    #1053865

    scvizar
    Participant

    ok, I was trying not to add those but the calendar datepicker doesn’t work. Any advice?

    #1054113

    Lely
    Moderator

    Hi There,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL so we can check the errors on the console. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1054353

    scvizar
    Participant
    This reply has been marked as private.
    #1054523

    scvizar
    Participant

    also see this… it’s what I’ve added on my _header.php file (child theme)

    it is correct?

    #1054526

    scvizar
    Participant

    here is the code

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_HEADER.PHP
    // -----------------------------------------------------------------------------
    // Declares the DOCTYPE for the site and includes the <head>.
    // =============================================================================
    
    ?>
    
    <!DOCTYPE html>
    <!--[if IE 9]><html class="no-js ie9" <?php language_attributes(); ?>><![endif]-->
    <!--[if gt IE 9]><!--><html class="no-js" <?php language_attributes(); ?>><!--<![endif]-->
    
    <head>
      <?php wp_head(); ?>
      <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
      <link rel="stylesheet" href="http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/horizontal-bookingexpert.css" />
    </head>
    
    <body <?php body_class(); ?>>
    
      <?php do_action( 'x_before_site_begin' ); ?>
    
      <div id="top" class="site">
    
      <?php do_action( 'x_after_site_begin' ); ?>

    I needed to add

    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
      <link rel="stylesheet" href="http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/horizontal-bookingexpert.css" />

    in the head

    #1055154

    Friech
    Moderator

    Hi There,

    Add this on your Child theme’s functions.php file instead.

    function enqueue_style() {
        wp_enqueue_style( 'smoothness', 'http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' );
         wp_enqueue_style( 'horizontal-bookingexpert', 'http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/horizontal-bookingexpert.css' );
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_style' );

    Hope it helps, Cheers!

    #1055914

    scvizar
    Participant

    nothing changes 🙁
    these are the complete instructions from bookingexpert:

    `<head>

    <link rel=”stylesheet” href=”http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css” />
    <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js”></script>
    <script src=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js”></script>
    <script type=”text/javascript” src=”http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/globalize/globalize-it.js”></script>
    <link rel=”stylesheet” href=”http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/horizontal.css” />

    </head>
    <body>
    <div id=”bookingexpert”>
    <div id=”searchbox”></div>
    </div>

    <script src=”https://be.bookingexpert.it/book/websites/searchbox?hotel=15008&lang=it”></script>
    <script>it.bookingexpert.SearchBox.load(‘searchbox’, ‘Default’);</script>

    </body>`

    and this is how look my functions.php file:

    function my_custom_head_output() { ?>
    
            <script type="text/javascript" src="http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/globalize/globalize-it.js"></script>
            
    
    <?php }
    
    add_action( 'wp_head', 'my_custom_head_output' );
    
    function enqueue_style() {
        wp_enqueue_style( 'smoothness', 'http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' );
         wp_enqueue_style( 'horizontal-bookingexpert', 'http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/horizontal-bookingexpert.css' );
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_style' );

    Where I’m wrong?

    #1056056

    Rue Nel
    Moderator

    Hello There,

    To properly load the jQuery and jQuery Ui, please insert this following code in your child theme’s functions.php file.

    function my_add_frontend_scripts() {
      wp_enqueue_script( 'globalize-it', get_stylesheet_directory_uri() . '/globalize/globalize-it.js', array(), '1.0.0', false );
      wp_enqueue_script('jquery');
      wp_enqueue_script('jquery-ui-core');
    
      wp_enqueue_style( 'smoothness', 'http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' );
      wp_enqueue_style( 'horizontal-bookingexpert', get_stylesheet_directory_uri() . '/horizontal-bookingexpert.css' );
    }
    add_action('wp_enqueue_scripts', 'my_add_frontend_scripts');

    We would loved to know if this has work for you. Thank you.

    #1056099

    scvizar
    Participant

    thank you guys but it does not work… no datepicker here…
    any advice?

    #1056209

    scvizar
    Participant

    this is how look my functions.php file:

    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    
    // =============================================================================
    // TABLE OF CONTENTS
    // -----------------------------------------------------------------------------
    //   01. Enqueue Parent Stylesheet
    //   02. Additional Functions
    // =============================================================================
    
    // Enqueue Parent Stylesheet
    // =============================================================================
    
    add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
    
    // Additional Functions
    // =============================================================================
    
    add_filter( 'wpcf7_support_html5_fallback', '__return_true' );
    
    function my_add_frontend_scripts() {
      wp_enqueue_script( 'globalize-it', get_stylesheet_directory_uri() . '/globalize/globalize-it.js', array(), '1.0.0', false );
      wp_enqueue_script('jquery');
      wp_enqueue_script('jquery-ui-core');
    
      wp_enqueue_style( 'smoothness', 'http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' );
      wp_enqueue_style( 'horizontal-bookingexpert', get_stylesheet_directory_uri() . '/horizontal-bookingexpert.css' );
    }
    add_action('wp_enqueue_scripts', 'my_add_frontend_scripts');
    
    

    In the homepage I added a raw content with this inside:

    
            
            <div id="bookingexpert">
                <div id="searchbox"></div>
            </div>
    
            
            <script src="https://be.bookingexpert.it/book/websites/searchbox?hotel=15008&lang=it"></script>
            <script>it.bookingexpert.SearchBox.load('searchbox', 'Default');</script>
    
    #1056249

    Paul R
    Moderator

    Hi,

    It sounds like you might be having an issue with a third party plugin or script. Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

    Thank you for your understanding.

    #1056282

    scvizar
    Participant

    It isn’t so. As you can see here http://hotelcrosal.creativaimage.it/booking/widget-ricerca.html the widget works great. If I add the code as they tell me to do Revolution Slider stop to work and the widget is not shown on the page. So I think is wrong the way you tell me to add the codes.

    Please…

    #1056328

    scvizar
    Participant

    I asked to the developer, he wants to know the variable with which you initialize all javascript functions (for example, if you use the $ or jQuery).