Okay
  Public Ticket #2856068
Users
Closed

Comments

  •  1
    parv started the conversation

    Hi guys,

    I would like to better track user logged in status to show an 'initial' package for users who are new to our site. (not logged)

    I have two questions regarding this:

    1) Is there a way to automatically create a wordpress user, upon a customer booking? I know you can do this manually in the backend in the 'customer panel', however, is this something that can be done automatically?

    2) Alternatively, is there a cleaner way to let users 'sign in' via amelia? I know currently they receive an email which they can use to set a password and sign up? It would be awesome if, upon booking, they can also sign up (if they should want?) 

    3) Lastly, is there a way to track if a user has ordered before, and any hooks or functions or variables I can use to create a conditional? For instance user_is_logged() [wordpress default function to check if logged]


    Ideally, it would be awesome to have some kind of way funnel customers to sign up to our site. To add, it would be awesome to be able to track their logged in status. Most importantly, though, it would be great if there was a much easier, more ux friendly way for users to both sign up and log into the site.

    Thanks for all your help!


    :)

  • [deleted] replied

    Hi Parv,

    thank you for reaching out to ussmile.png

    1. You can activate Automatically Create Amelia Customer, so that person who books for the first time will automatically get Amelia Customer WordPress role and receive a login link for the backend. As for the Customer Panel, if you insert the Customer Panel placeholder into the Appointment Approved email (and set up the panel beforehand), when they book for the first time they will receive a login link for the Panel with their booking confirmation.

    2. These are the only two ways to sign up or log in at the moment, I'm afraid.

    3.Unfortunately we don't have hooks (action and filters) at the moment. What we have is a few JS hooks that is triggered depends 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)

    JS files are modified (minimized) in public version of plugin (in our development environment is accessible), but unfortunately I can not send you our source code because that is the policy of our company.

    All those files that have extension .vue are compressed and minimized in JS files that is very hard and not recommended modifying. So in order to add some other features you can unminify the js and customize it.