Support

Home Forums Event Espresso Premium Promo code add-on for pre-approval/invoice option

Promo code add-on for pre-approval/invoice option

Posted: February 1, 2019 at 8:34 am

Viewing 2 reply threads


bakerrisk

February 1, 2019 at 8:34 am

We require pre-approval of registrations before users are allowed to complete registration & payment. We have a promo code we want to provide to current members but there is no where they can enter the code during the checkout process. At the “Payment option” step it has the “Requiring Pre-Approval” explanation with no promo code field.

We only have the invoice option right now as we are working with our vendor to setup a payment gateway. We want to have the invoice created during this step to have the discount code already in it.

Is there a way to allow users to be able to enter a promo code during registration or on the “Payment option” step while we only have the invoice option?


bakerrisk

February 1, 2019 at 9:28 am

I ran through the steps of registration process and need to update my question.

Because we have a pre-approval process, after a user completes the registration they get to the “Thank You” page with the message:

Congratulations<br>
Your registration has been successfully processed.
Check your email for your registration confirmation or click the button below to view / download / print a full description of your purchases and registration information.<br>
Button: View Full Order Confirmation Receipt

Is there a way to remove that message and receipt button for the “Not Approved” REG status?

It is confusing that they are able to download a receipt when they have not been approved yet to be able to pay.


Tony

  • Support Staff

February 5, 2019 at 8:38 am

Hi there,

We have a promo code we want to provide to current members but there is no where they can enter the code during the checkout process. At the “Payment option” step it has the “Requiring Pre-Approval” explanation with no promo code field.

Just to provide some details on this, when you use the ‘Not Approved’ status, the user can not reach the payment options (which is where the Promo code field is loaded).

One of the reasons for this is if your not approved and then pay, you then need to refund the payment etc.

This also applies to Promotion codes, if you have a promotion code with X number of uses, the ‘use’ of a promotion code is saves as soon as it is entered and deemed valid, meaning if your registration is Not approved, and then declined, if you’ve used a promotion code that use is ‘lost’ as you can’t remove a use from a promo code at this time.

Is there a way to remove that message and receipt button for the “Not Approved” REG status?

Yes, there is, but it requires a little PHP and you need to load a custom version of the template for that section.

Are you using a Child theme on the site? If not I recommend you create one as you’ll need to load the template from your themes root directory, if you don’t have a custom theme and you update the theme, any custom templates you had in there will be lost unless you are using a child theme.

There’s a guide on how to create a child theme here:

https://developer.wordpress.org/themes/advanced-topics/child-themes/

Then, copy \event-espresso-core-reg\modules\thank_you_page\templates\thank-you-page-overview.template.php

Into your child themes root directory.

In that location, open the file and and add:

$where = array(
    'TXN_ID' => $transaction->ID(),
    'STS_ID' => EEM_Registration::status_id_not_approved
);
$not_approved_registrations = EEM_Registration::instance()->count(array($where));

Just before the ?> on line 8.

Then find <?php if (! $revisit) : ?>

Change it to:

<?php if (! $revisit && $not_approved_registrations == 0) : ?>

That will remove that section if there are any Not Approved registrations in the group.

Whilst we don’t support these kinds of customizations I made the above changes to the template to confirm it worked, so I’ve uploaded that here if you’d like to use it (place it within the root directory of your child theme):

https://gist.github.com/Pebblo/f0ea64f857e920ee70ece5a428c24ae4

Viewing 2 reply threads

The support post ‘Promo code add-on for pre-approval/invoice option’ 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.

Event Espresso