Support forumCategory: QuestionsCreate Appointment after a payment
fs87 asked 3 years ago

What can i do if a client after fill the form and redirect to woocommerce cart, but in the cart the client choose delete the item leaving the cart empty? In EA the appointment is create with “pending” status blocking that date and hour, but there is no confirmation.
There is an option to delete automatically on EA if the client delete on woocommerce?
Or there is an option to block the date and hour just when the order was pay?

4 Answers
Nikola Loncar Staff answered 2 years ago

Hi, you are right atm you need to click on Cancel link in order to free that appointment. We will need to find a proper solution for that one. Only thing is what if customer finish checkout after 15minutes and that appointment is not longer there 🙁

Best reagrds,
Nikola

fs87 replied 2 years ago

Just for woocommerce because i dont know how much will be affected on others connections, but, on woocommerce, if the appointment during more of 15 minutes with status pending this will be clear on EA and Woocommece (with a popup countdown notification like the websites of cinemas that sell the tickets), if the client try to make a payment after this time woocommerce says “your cart is empty”. I don’t know if that is possible but i think that could be work. Thanks for your reply!

fs87 replied 2 years ago

In other sence but has relation with the before question, when the client is logged can make unlimited appointments even if the hold appointment is “1”. I’ve been reading that you say than that block just work if the user is logout, but in this case i need that the client will be logged with their account to complete the payment. I block woocommerce with max item for client with “1”, if the client try back and select another date, is created on EA but is not add to cart, prevent double charges.

Woocommerce has this option, but i am forcing this with this code on funtions.php

add_filter( ‘woocommerce_add_cart_item_data’, ‘mk_only_one_item_in_cart’, 10, 1 );

function mk_only_one_item_in_cart( $cartItemData ) {
wc_empty_cart();

return $cartItemData;
}

Maybe a filter like that, working on EA prevent that the client create unlimited appointments blocking differents dates.

I’m not so good programming on php but maybe can help you with the logic of this trouble.

Thanks a lot Nikola.

m.marengere answered 2 years ago

Any updates on this ? We really need to have an option for the slot to get block “only” once the woocommerce payment is complete. The fact that we can set the appointment to pending and get it automatically becomes confirmed after the woocommerce payment, means that this option is feasible as there’s is a relation between a processed payment and an appointment status. I understand that some double booking may occurs but we should at least have the option to take the risk of having double bookings because a lot of times, if the client don’t pay within 30sec to 2min, it’s because they left the cart. Plus the chance of a double booking within an online checkout time frame especially for a low traffic website are very slim.

Nikola Loncar Staff replied 2 years ago

Hi, we can instead of pending put status to reservation as option to Extension. Those reservations are hold up to 5 minutes and cleared after that time period if user hasn’t completed payment. Can you please tell if that will solve problem that you have?

Best regards,
Nikola

m.marengere replied 2 years ago

I tried this already and waited more than 5mins and slot never became free again. Maybe I did something wrong.

Here’s what I did but didn’t worked

Config in settings :
1. appointment default status set to confirmed.
2. Auto reservation option checked on.

Here’s what I need :

Scenario of a successful payment:

1.Client choose date and time and click submit.
(Result : Slot is blocked and appointment status is set to reservation for a maximum of 5min timeframe).
2. Client is redirected to Cart and do the checkout within the 5mins.
(Result : Slot remain blocked and appointment status change to confirmed)

Scenario of an unsuccessful payment:

1.Client choose date and time and click submit.
(Result : Slot is blocked and appointment status is pending for a maximum of 5mins timeframe)
2. Client is redirected to Cart but don’t complete the payment within 5min .(ps: probably because he left the cart)
(Result : After 5 mins timeframe, slot becomes free and appointment is deleted or canceled.)

Thanks Nik. Appreciate your help!

m.marengere replied 2 years ago

Sorry my last part was wrong.
Last paragraph, Line 3, I meant :

1.Client choose date and time and click submit.
(Result : Slot is blocked and appointment status is ****reservation**** for a maximum of 5mins timeframe)

Nikola Loncar Staff answered 2 years ago

Hi, we will add default status reservation option to list in next version. You then have to turn off auto reservation option and select default status to be reservation. After that everything should work as you mention. 🙂

Best regards,
Nikola

m.marengere replied 2 years ago

Ok thanks! Do you have an ETA for the new version release ?

Nikola Loncar Staff replied 2 years ago

It will be released today 🙂

Best regards,
Nikola

m.marengere replied 2 years ago

Wow that was fast. Thanks Nik! Can’t wait to try this out. 👍

m.marengere replied 2 years ago

Hi Nik, we are experiencing this issue below

Config in settings :
1. appointment default status set to reservation.
2. Auto reservation option checked off.

Situation :

Client choose date and time and click submit.
(Result : Slot is blocked and appointment status is set to reservation for a maximum of 5min timeframe).
***this is working perfectly. If they don’t checkout and pay within 5min, appointment is deleted (not canceled btw). It is simply deleted which is ok with us. Would’ve been better if status was changed to canceled it’s ok for now.

Problem : when client do the checkout and pay within the 5mins, the appointment status remain “reservation” and do not change automatically for “confirmed” and get deleted after 5mins.

In other words everything is perfect when a client don’t complete the checkout but for a client that do pay and checkout, the reservation doesn’t confirm and get deleted.

Thanks!

fs87 answered 2 years ago

Good news!!!

Nikola Loncar Staff replied 2 years ago

Thanks for update I will close this thread 🙂

Best regards,
Nikola

m.marengere replied 2 years ago

See comment above (1 week ago) :

Hi Nik, we are experiencing this issue below

Config in settings :
1. appointment default status set to reservation.
2. Auto reservation option checked off.

Situation :

Client choose date and time and click submit.
(Result : Slot is blocked and appointment status is set to reservation for a maximum of 5min timeframe).
***this is working perfectly. If they don’t checkout and pay within 5min, appointment is deleted (not canceled btw). It is simply deleted which is ok with us. Would’ve been better if status was changed to canceled it’s ok for now.

Problem : when client do the checkout and pay within the 5mins, the appointment status remain “reservation” and do not change automatically for “confirmed” and get deleted after 5mins.

In other words everything is perfect when a client don’t complete the checkout but for a client that do pay and checkout, the reservation doesn’t confirm and get deleted.

Thanks!