Support

Home Forums Event Espresso Premium Groupon/Promotional Codes Mod

Groupon/Promotional Codes Mod

Posted: February 9, 2013 at 10:19 am

Viewing 4 reply threads


Philip

February 9, 2013 at 10:19 am

My last thread was closed due to inactivity, sorry it has taken me so long to get back. https://eventespresso.com/topic/how-to-promotions-work/

I had a coder friend of mine modify the groupon addon to allow selection of $ or % for groupon codes, as well as a usage limit to allow more customizable discount options. All discounts are taken off the order total.

Now the problem is, we also had to modify the /includes/process-registration/payment_page.php file as I couldn’t figure out a way to make it ‘upgrade’ proof. All other code is in the modified groupon add-on.

So my question is.. what are my options for making this upgradable? I’m sharing all the code here for anyone to use. Thanks in advance!

Modified Groupon Add-on: (we renamed it to espresso-spellbound as thats the site we made this for)
https://dl.dropbox.com/u/13339474/espresso-spellbound.zip

Note: we didn’t change the csv import so that won’t work with the new options we added, maybe I can get him to do it, if not maybe somebody else can help?

And here is the modified pluginsevent-espressoincludesprocess-registrationpayment_page.php
https://dl.dropbox.com/u/13339474/payment_page.zip

There have been some updates to EE since we did this. Is anybody from the team available to help me merge my modified payment_page.php with the the latest one for 3.1.30.5P.

Thank you!


Seth Shoultes

  • Support Staff

February 9, 2013 at 12:59 pm

Hi Philip! Thanks for sharing the code. I will see if we can get it integrated for you.


Philip

February 9, 2013 at 4:45 pm

Thank you, that would be great.


Philip

February 14, 2013 at 10:01 am

Hi Guys, not sure if anyone had a second to look at this. I unfortunately have not been able to make my site live due to an error I noticed in this script I had created for me.

Everything is working fine as far as the code applying the correct discount and sending the correct total.

However, The Payment overview page displayed after payment which lists Amount Paid/Owed: still displays my original price. Looking at the template file its using the $total_cost variable.

So I’m not sure whats going on, but I see $total_cost is not being updated/passed correctly? I also tried using $final_price instead but that did not work in the payment overview template.

Also in my payment confirmation email I get it tells me in the itemized section it also lists the full price ($40) for the item but then total says $1 which is correct (used $39 off code).

I’m close 🙂 Hopefully can get it going this week.

Thank you in advance!


Chris Reynolds

  • Support Staff

February 26, 2013 at 10:12 am

The Payment overview page displayed after payment which lists Amount Paid/Owed: still displays my original price. Looking at the template file its using the $total_cost variable.

That’s because that field serves 2 purposes, hence the reason why it’s labeled “Amount Paid/Owed“. Obviously “paid” and “owed” are not the same thing.

If the registration is in Completed status, the total paid will be the value displayed in that field. If the registration is Incomplete or Pending, the amount owed will be the value displayed in that field.

Viewing 4 reply threads

The support post ‘Groupon/Promotional Codes Mod’ 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