Support

Home Forums Event Espresso Premium Coupon Code not working with Add to Cart feature

Coupon Code not working with Add to Cart feature

Posted: January 11, 2014 at 8:39 am


tamara smith

January 11, 2014 at 8:39 am

When I add a coupon code to to my “cart” it doesn’t work. It only works if i register for 1 event at a time. Is there a setting I need to change to allow that coupon to be used in the cart? (either to specific events or to the order total?)


Dean

January 13, 2014 at 1:39 am

Hi,

The option for coupon codes in the cart is disable by default. To enable it, go to the dashboard Event Espresso > General settings and look for the option “Allow discounts in the shopping cart?” and set it to yes, and save the settings.


tamara smith

January 13, 2014 at 7:55 am

Thanks Dean. Sadly, this was already marked to “yes” and it is still not working. Any other ideas?!
-Tamara


Sarah Rogers

January 13, 2014 at 11:52 am

I am also having this issue. My general settings are correct.


Josh

  • Support Staff

January 13, 2014 at 12:54 pm

Hi Tamara and Sarah,

Can either of you explain which step of applying a coupon code is not working?


Sarah Rogers

January 13, 2014 at 12:57 pm

Hi Josh,

Looking over the documentation, I think something is wrong with my plugin.

I do not get “Promo Codes in Use” or the checkboxes next to my events like in the last image on this page.

https://eventespresso.com/wiki/promotional-codes/

Thanks,
Kindra


tamara smith

January 13, 2014 at 1:22 pm

for me it is after I have added a few classes to my cart. then at the bottom of my cart there is a place to enter the promo code. I enter codes that work when I’m registering for 1 event, but the same code isn’t working in the cart. You can see mine here:
http://www.growingtimeclasses.com/register/


Josh

  • Support Staff

January 13, 2014 at 1:57 pm

@Kindra,

Is the Allow Promo Codes option set to:

“Global Promo Codes and Specific ones…”

@tamara,

Are you using the Global promo code feature (global codes will work for every event) or are the codes assigned to specific events? Another thing to try is make sure the promo codes are in all caps. If there are mixed caps in the promo codes when using Multi Event Registration it doesn’t always work as expected on some servers.


tamara smith

January 13, 2014 at 2:15 pm

Josh- I am using the global codes feature. The same codes for every event. I tried switching the code to be all caps. Also tried eliminating the number so it was only letters. Tried only numbers as well. Tried switching my preferences to ” All promo codes even non-globals). Still no luck.


tamara smith

January 13, 2014 at 2:19 pm

Ok- tried one more thing. Set my event to: Global and Specific Promo Codes. Now the promo code works in the add to cart function. BUT .. only the code that offers a percentage off is working. The promo code that offers a flat $5 off is not working still! Any suggestions?


tamara smith

January 13, 2014 at 2:35 pm

Actually- scratch that- it’s all working for me now. Just needed to clear my cache I think. So the thing that worked in the end was changing each event to accept Global and Specific Promo Codes. Caps doesn’t seems to be making a difference.

Thanks for your troubleshooting help!

-Tamara


Sarah Rogers

January 13, 2014 at 3:06 pm

Hi Josh,

My settings are set to Global & Specific, but I get:

Promocodes in Use:
None

Add Promocodes:
No more promocodes available for selection


Josh

  • Support Staff

January 13, 2014 at 3:39 pm

Hi Kindra,

Just below the “No more promocodes available for selection” text there is a link that says “Manage Promotional Codes”. When you click that link are there Promo codes listed there? If so, do they have Y’s or N’s in the Global column?


Sarah Rogers

January 13, 2014 at 3:45 pm

Hi Josh,

They all have Y’s…

Thanks,
K


Josh

  • Support Staff

January 14, 2014 at 8:03 am

Hi Sarah,

Since they all have Y’s, this means they are global codes and will automatically be assigned to work all the events that are set to allow global codes. If you prefer to select specific codes for specific events, you can set the global option in the promo code editor to No.


Sarah Rogers

January 14, 2014 at 8:05 am

Ok, that’s fine, but they don’t take any money off in the shopping cart…


Sidney Harrell

January 14, 2014 at 10:47 am

Hey Sarah, do you get a message in the cart that the coupon code has been applied?
It may be something that would be really easy for us to debug on your server, but would be really hard going back and forth in the forums. Can you fill out the form here and be sure to include ftp credentials. Thanks.


Sarah Rogers

January 14, 2014 at 11:07 am

Hi Sidney, I’ll send login info now.

Thanks,
K


Sidney Harrell

January 14, 2014 at 11:55 am

Hi Sarah,
In event #89, ‘Improv Sampler’, it looks like groupon codes were turned on, but coupon codes were turned off. I changed it to ‘Global & Specific’ and the codes started working in the cart for that event. The text underneath that setting where it says no promo codes in use refers to event-specific codes. You’ll need to go into each event that you want coupon codes to apply to and change that setting to allow them.


Sarah Rogers

January 14, 2014 at 12:11 pm

Ok, I got it to work when I set it to Global and Specific. Now my question is – how do I set a specific Comp code for an event?

For example, I want to use the code COMPEARLY for this event: http://monkeybusinessinstitute.com/event-registration/?ee=379

But when I set COMPEARLY to N for global and my event to global and specific, I can’t choose COMPEARLY. Help!


Josh

  • Support Staff

January 14, 2014 at 12:46 pm

Hi Kinda,

I checked and the reason you can select COMPEARLY is because that is a promo code created by another user. You’ll need to either create your own equivalent promo code, or disable the roles and permissions add-on. The Roles and Permission add-on separates the promo codes per user account so one user’s promo codes can’t be used on another user’s event.


Sarah Rogers

January 14, 2014 at 1:21 pm

Ok, I removed the permissions & roles manager, now my issue is that when the discount is applied, it takes off the ENTIRE amount. For example, I tried to buy 4 tickets for this show:

http://monkeybusinessinstitute.com/event-registration/?regevent_action=register&event_id=379&name_of_event=All%20Ages%20Show

the total was $24.00. I used the code COMPEARLY and it took off the entire amount – not only the $12.00 it should have.


Sarah Rogers

January 14, 2014 at 1:23 pm

I’m sorry, it was actually the show after… here is the attendee URL
http://monkeybusinessinstitute.com/funny/wp-admin/admin.php?page=events&event_admin_reports=list_attendee_payments&event_id=505


Josh

  • Support Staff

January 14, 2014 at 1:58 pm

It turns out that the promo code feature discounts each ticket. So each ticket in the order gets discounted by the amount set for the promocode. I think Sidney may have some custom code worked out that can be used to modify this though.


Sarah Rogers

January 14, 2014 at 2:08 pm

Thanks Josh,

I’ll wait for Sidney’s code then..


Josh

  • Support Staff

January 14, 2014 at 2:21 pm

Hi Sarah,

I’m not sure that Sidney’s code will work with Multi Event Registration, so it may be worth looking into how the discounts are set up and making a few adjustments. For example, percentage discounts will make it so you can discount a percentage off each ticket instead of a whole dollar amount that’s more than the value of the ticket.


Sarah Rogers

January 14, 2014 at 2:29 pm

That won’t work for my client unfortunately. Unless you can set a cap on a percentage.

So you are saying that as long as the MER is installed I can’t use promo codes…because the codes aren’t working on events that aren’t MER events…like the Grown Up shows.


Josh

  • Support Staff

January 14, 2014 at 2:49 pm

I am not saying you can’t use Multi Event Registration if you use promo codes. To clarify: The promo code feature works the same way whether Multi Event Registration is installed or not. It discounts the amount of the promo code per ticket.


Sarah Rogers

January 14, 2014 at 3:11 pm

Ok, I got you now – is there a way to limit the amount of comp codes that can be applied? Basically, on one transaction I want to offer a max of two tickets for free.


Sidney Harrell

January 14, 2014 at 4:05 pm

The standard behavior is for the discount code to apply to each ticket in the cart.
I’ve just worked up some code changes that gives you an option to override that behavior and only apply the coupon once to the entire cart. If you would like to beta test those changes, let us know and we can apply the changes to your installation. Thanks.


Sarah Rogers

January 14, 2014 at 4:07 pm

I would love to Sidney – thank you!


Sidney Harrell

January 14, 2014 at 5:23 pm

All set. Please be aware that if you use the automatic update feature then the changes will get overwritten. If the changes are integrated into EE core, then they will be in the 3.1.38 release.


Sarah Rogers

January 14, 2014 at 7:46 pm

Thanks Sidney – now my question is based on your response below.

The standard behavior is for the discount code to apply to each ticket in the cart.
I’ve just worked up some code changes that gives you an option to override that behavior and only apply the coupon once to the entire cart. If you would like to beta test those changes, let us know and we can apply the changes to your installation. Thanks.

The code you’ve added isn’t applying the entire value of the coupon to the cart – it’s just applying it to one of the tickets. For example, I want to let someone have $12.00 off of their cart price – but with the update you’ve made, if they choose 2 tickets ($6.00 each) the discount is only $6, not $12. Hope this makes sense.

Cheers,
Kindra


Sidney Harrell

January 16, 2014 at 11:03 am

If you go into includes/admin-files/coupon-management/use_coupon_code.php and comment out line 125:

$event_cost = (float)$event_cost > 0.00 ? (float)$event_cost : 0.00;

it will disable the check that prevents coupon codes from producing negative ticket prices. It’s not really recommended, since the customer could put one ticket in the cart, apply the coupon code, and end up with a negative total cost.


Sarah Rogers

January 16, 2014 at 12:56 pm

Hey Sidney, That will work for my purposes – thank you. Can you let me know what code you altered before so that I can figure out what to do when you update the core?

Thank you,
Kindra


Sidney Harrell

January 16, 2014 at 3:15 pm

Can I send you a file with the raw diff? Our codebase system can generate a unified diff output (http://en.wikipedia.org/wiki/Diff#Unified_format) that is fairly easy to read. I put it in a github gist that you can read here. The line numbers might be a little off, since I applied it to our 3.1.38-development branch, but the nice part about the diff format is that it includes lines around the change to help orient you. Those are the lines without anything in front of them. The lines with a minus in front are lines that come out, and the lines with a plus in front are lines that go in.

The support post ‘Coupon Code not working with Add to Cart feature’ 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