Okay
  Public Ticket #1372778
Button location
Closed

Comments

  • Vlad started the conversation

    Hello,


    I would like to add a redirect function in a button and I can't find the html code for that button. Can you please tell me where should I look for things like these?

    Thank you.

  •  2,057
    Theme replied

    Hello,

    can you please be more specific about the button you are referring to, so that we can point you to the correct file?

    Thank you

    Best regards,

    themeenergy support

  • Vlad replied

    It's the button that the client uses to send the reservation. The last step when a reservation is made.

    This is the code that I found in the accommodation-booking-form file:

    <?php BookYourTravel_Theme_Utils::render_submit_button("primary-btn", "submit-accommodation-booking", esc_html__('TRIMITE REZERVAREA', 'bookyourtravel')); ?>

    I can't find the html form of the button so I can make the modifications. I want it to redirect to another page after the click and I also want to put a tracking code in it.

    Thanks.

  •  2,057
    Theme replied

    Hi,

    You would do that in javascript.

    the file you are looking for is js/accommodations.js

    And the action depends on whether you are using WooCommerce or not.

    - If you are not using WooCommerce, you need to add your redirect inside the processBooking function, after this code:

    success:function(data) {

    - If you are using WooCommerce, you should look for this code:

    $('.book-accommodation-next').on('click', function(e) {

    Best regards,

    themeenergy support

  • Vlad replied

    Ok, thanks

  •  2,057
    Theme replied

    You are welcome.

    Best regards,

    themeenergy support