Need help with Joomla? We are available for hire to help with Joomla customization, upgrades, maintenance, and custom development.
Explore our services

onAfterStoreRegistrant v onAfterPaymentSuccess

  • Donal
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 11 months ago #105918 by Donal
Hi Tuan,

I have a acyMailing list configured for my event.

At the moment, somebody is signed up to the mailing list if they
a) Complete the registration form and pay
b) complete the registration form and DON'T pay (e.g. payment declined. I only use Stripe payment plugin, which is inline on the form)
c) join the waiting list for the event

In the past, I changed this behaviour, by changing onAfterStoreRegistrant to onAfterPaymentSuccess in plugins/eventbooking/acymailing/acymailing.php

This insured that only properly registered customers were on my event's mailing list.

However, it also meant that I needed to manually add waiting list people to a seperate waiting list.

I have tried to make the system a bit better, by
a) reverting back to onAfterStoreRegistrant
b) Mapping fields from Event Booking to AcyMailing, e.g. published and payment_status so I can filter for paid/waiting list/etc.

My first issue was that if an email existed as a user already (i.e. going from waiting list to registered), then the plugin didn't update the fields. I fixed this issue by removing the "if (!$subId)" logic from subscribeToAcyMailingLists.

My next issue is that, despite using inline payment plugins, e.g. Stripe, the payment_status is recording in AcyMailing as 0, presumably as the record is stored before payment confirmation has been received. This is a showstopper.

Could I have both a onAfterStoreRegistrant (to handle only waiting list people) and a onAfterPaymentSuccess (to handle paid up registrants) in the plugin?


Thanks,
Donal

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Online
  • Administrator
  • Administrator
More
8 years 11 months ago #105944 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic onAfterStoreRegistrant v onAfterPaymentSuccess
Nothing prevent you from using both events. Just remember that onAfterStoreRegistrant is triggered before payment processed (after registration data is stored in database) and onAfterPaymentSuccess is triggered when payment is completed (or when admin approve an offline registration from administrator area of the site)

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Donal
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 11 months ago #106005 by Donal
I've implemented this, and it almost works perfectly for me. :lol:

As I don't want "Pending" to be added to the mailing lists, I have added the following logic into onAfterStoreRegistrant if ($listIds != '' AND $row->published==3), so only waiting list people are added. Properly registered people are then added through the call to onAfterPaymentSuccess. I bring accross "Published" to differentiate between registered (1) and waiting list (3)

Unfortunately, this still doesn't work for me as customers often register for 1 event, and join waiting list for other, nearer event. Currently in that scenario, a customer is added to 2 events mailing lists. Published could be either 1 or 3, depending on which one they did first, but there is no way to easily link their mailing list with their Published status, i.e. know which event they are registered for versus which event they are on the waiting list for.

Would you consider modifying the plug-in, so that you could specify lists for people who join an event's waiting list, as well as lists for people who fully register for an event? If you are too busy, can you recommend a php developer that I could engage, who would implement the changes in such a way that they could be easily incorporated into future releases of your version of EB (if you thought the changes were good)?

Thanks,
Donal

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Online
  • Administrator
  • Administrator
More
8 years 11 months ago #106018 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic onAfterStoreRegistrant v onAfterPaymentSuccess
Hi Donal

I am sorry but I don't have plan to modify the plugin for supporting it at the moment, so please find a developer to modify it for you to meet your need. I guess you will need to keep a copy of the plugin and install it each time you update. If you can share it back here, it is even better

I still have other more important features I want to focus working on first, so for this one, please help handling it yourself

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc