Greetings. I found the following post and want to know what promotions php file to paste this code into so to treat promotions as decreasing-in-value gift cards (yes, I understand this is not supported). I appreciate the help. Thanks
So, that proof of concept solution I posted there doesn’t replace ANY of the fils/functions within the promotions add-on. If a solution requires you to edit core files of a plugin/add-on then I won’t post it as it’s not a viable solution to the problem.
That snippet uses a hook in the promotions add-on to hook in and do its thing, so can add that to a custom functions plugin on your site, we have some documentation on creating one here:
Tony. This is great and it has implemented successfully. One use case, however, is if a user begins registering for events, applies a promo code, the promo code applies (and reduces the dollar amount of that code per your php)… but what if the user abandons the transaction? I see the promo code’s dollar amount remains decreased. Is there a function that can restore the value debited back to the code? – worse case is I add text to the checkout page “once a promo code is used cannot not be restored – please finish the transaction”
Because the promotion has been applied to the transaction, it increments the usage and does decrement again. This is the same for all of the EE4 Promotion system, not just my snippet.
You (the admin) can trigger the pending payment emails or send them the checkout link to resume that same checkout but you can’t remove the usage to allow them to start another and reuse the code currently.
Viewing 3 reply threads
The support post ‘EE4 Promotions as Gift Cards’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.