Okay
  Public Ticket #2683277
Show price including and excluding VAT
Closed

Comments

  • Arne started the conversation

    Hello,

    A customer requests within the form in the last step where the data is requested from the visitor to place the price including and excluding VAT.

    Is there a setting to display the price with and without VAT?
    Or is there a possibility to execute a javascript / php function when loading this form, so that I can run the calculation and add it to the form?

    Thanks in advance,
    kind regards,
    Arne

  • [deleted] replied

    Hello Arne,

    Apologies for replying a bit later, we don't work on weekends.

    There isn't a possibility of adding VAT to prices in Amelia with its current built-in features, unfortunately. Taxes can be added to prices only in WooCommerce, when WooCommerce integration is used https://wpamelia.com/woocommerce-integration/, but this isn't reflected in Amelia. Maybe it can be achieved with some customization of the plugin, but such customizations aren't covered by our support so we can't help out with that, unfortunately. 

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.


  • Arne replied

    Hello,

    Is there a template file from the last step so that I can call a js function there to display the VAT?

    WooCommerce is not really a solution for this website, because no online payment can be made on the website.

    Thanks in advance,
    kind regards,
    Arne

  • [deleted] replied

    Hello Arne, 

    Because Amelia uses Vue that is not possible, maybe you can try achieving what you need using one of the JS hooks, for example "beforeConfirmBookingLoaded", to use the JS to modify DOM.

    These are the JS hooks in Amelia, triggered depending on the view:

    window.beforeAddToCalendarLoaded()
    window.beforeBookingLoaded()
    window.beforeSearchLoaded()
    window.beforeSearchFiltered()
    window.afterSearchFiltered()
    window.beforeConfirmedBooking()
    window.beforeCatalogLoaded()
    window.afterSelectCatalogCategory(object_category)
    window.beforeCatalogCategoryLoaded(object_category)
    window.beforeCatalogServiceLoaded(object_category, object_service)
    window.afterSearchActivateService(object_appointment, object_serviceActive)
    window.afterSearchGoToSecondStep(object_appointment, object_serviceActive)
    window.afterBookingSelectDateAndTime(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.afterBookingSelectService(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.beforeConfirmBookingLoaded(object_appointment, object_service, object_provider, object_location)
    window.afterConfirmBooking(object_appointment, object_service, object_provider, object_location)

     


    If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.


  • Arne replied

    Hello,

    Thanks for the webhook tip, I'm not that familiar with using this.
    Do I juist put that webhook in my js file? Something like this:

    window.beforeConfirmBookingLoaded(function(){
        // do something
    });
    

    Thanks in advance,
    kind regards,
    Arne

  • [deleted] replied

    Hello Arne,

    You are welcome. 

    Yes, you would need to add some function to it and add it like as a script to the page where you have Amelia. Unfortunately, we can't help out with that as such customization isn't covered by our support.

    This is an example of using a JS hook for redirecting to another page after booking:


    <script>
    window.beforeConfirmedBooking = function()
    {
    window.location.href = "https://www.google.com";
    };
    </script>


    If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.