Support

Home Forums Event Espresso Premium Coupons / Discount Codes not working

Coupons / Discount Codes not working

Posted: June 28, 2015 at 8:52 am

Viewing 24 reply threads


Joe Flynn

June 28, 2015 at 8:52 am

We have created a number of discount codes and ensured that they are attached/assigned to all events in our system, however, when purchasing a ticket and getting to the payment page, the field to enter the coupon code is present but the button to submit the code is disabled.

We cannot find any reason why it would be disabled.

Please help.


Dean

June 29, 2015 at 2:10 am

Hi Joe,

Can you provide a link to an event please? It might just be a CSS/JavaScript clash causing the button to be disabled.


Joe Flynn

June 29, 2015 at 10:11 am

http://dev.towardsthedigitalwaterutility.org/live-online-conference/

Discount Codes:

TDWU35DISCOUNT
TDWU100DISCOUNT

Thanks.


Lorenzo Orlando Caum

  • Support Staff

June 29, 2015 at 12:41 pm

Hi, there is an Javascript error appearing on the registration checkout related to a cufon font.

Does this issue go away when only Event Espresso 4 beta and the promotions add-on are activated?


Lorenzo


Joe Flynn

June 29, 2015 at 2:42 pm

I just resolved the Javascript error. The button is still disabled and the issue still present.


Joe Flynn

June 29, 2015 at 3:45 pm

I have also tried disabling everything except Event Espresso. Still occurs.


Josh

  • Support Staff

June 29, 2015 at 6:31 pm

Hi Joe,

I went to check the URL you posted and it’s returning a 500 internal server error. Has the URL changed?


Joe Flynn

June 30, 2015 at 4:07 am

Yes it has. It is now:

http://towardsthedigitalwaterutility.org/live-online-conference/


Dean

June 30, 2015 at 4:57 am

Hi,

Thanks for the link.

You said that disabling all other plugins does not change the disabled issue. If so, can you please install and use the Theme Test Drive plugin, with a default theme such as Twentyfifteen, to see if it is a theme issue.

https://wordpress.org/plugins/theme-test-drive/

What I know for sure is something (theme or plugin) has JavaScript that is affecting the button, but narrowing it down will be hard without disabling them all to begin with.

Something is also affecting the messages (errors, notifications, etc) from Event Espresso. This may be related.


Joe Flynn

June 30, 2015 at 8:39 am

Error messages and notifications do appear to be working properly.

I have tested now with the TwentyFifteen theme, and I also disabled all plugins except for EE and EE Promotions to be thorough, and the issue is still present.


Lorenzo Orlando Caum

  • Support Staff

June 30, 2015 at 9:13 am

Hi, what is the version number that is in use for the promotions add-on?

Could you check via WordPress plugins and then reply here with that number?


Lorenzo


Joe Flynn

June 30, 2015 at 11:20 am

The promotions version is Version 1.0.0.beta.065


Joe Flynn

July 1, 2015 at 9:11 am

Awaiting your reply….


Josh

  • Support Staff

July 1, 2015 at 1:14 pm

Hi Joe,

It turns out that there’s a known issue with the Promotions add-on beta where the Submit Promotion code button is disabled when the Stripe Payment method is open by default. This and a few other issues with using the Stripe gateway + Promotions add-on are being worked out and will be fixed before the official release of the Promotions add-on.


Joe Flynn

July 2, 2015 at 5:22 am

What is the estimated time for release of this fix? We need to be able to offer discount codes for our event tickets!!


Josh

  • Support Staff

July 2, 2015 at 8:01 am

Hi Joe,

We have a fix that’s available for testing and it’s available from the Github repository. Please note that we do not recommend using beta plugins on live productions sites. We recommend using them for testing and evaluation purposes.

You can download Event Espresso 4.8 beta (required to run promotions) here:
https://github.com/eventespresso/event-espresso-core/tree/BETA-4.8-CORE

Current promotions beta plugin:
https://github.com/eventespresso/EE4-Promotions


Joe Flynn

July 6, 2015 at 2:31 pm

If we switch to a payment gateway other than Stripe with the version we are currently using, would it then rectify the issue and allow us to use the discount codes?

If so, can you suggest which payment methods WILL work with the discount codes on our current version?

Thanks.


Joe Flynn

July 7, 2015 at 9:26 am

Just following up on this please.


Josh

  • Support Staff

July 7, 2015 at 3:04 pm

Any other gateway other than Stripe will work, but please be advised that the beta version that you’re using isn’t recommended to be used on a live production site.


Joe Flynn

July 13, 2015 at 4:29 am

The latest beta version did NOT resolve the issue. We rolled back to our existing version and have implemented a jQuery solution to this issue, which has been placed in the footer.php of our child theme.

If you find other users with this issue, they can feel free to use the following code:

jQuery(document).ready(function () {
	setInterval(function () {
		if (jQuery('#ee-spco-payment_options-reg-step-form').is(':visible')) {
			jQuery('#ee-promotion-code-submit').removeAttr("disabled");
			jQuery('#ee-promotion-code-submit').removeClass("disabled");
			jQuery('#ee-promotion-code-submit').removeClass("spco-disabled-submit-btn");
			jQuery('#ee-promotion-code-submit').click(function() {  
			setTimeout(function (){
					location.reload();
				}, 3000);
			});
		}
	}, 1000);
	jQuery('#ee-promotion-code-submit').click(function() {  
		setTimeout(function (){
			location.reload();
		}, 3000);
	});
});


Josh

  • Support Staff

July 13, 2015 at 10:36 am

We do not advise using the above jQuery. Instead, if anyone is running into this issue while testing the promotions add-on, please update to the current beta versions of EE4.8 and the promotions add-on available on Github. The issue reported here was fixed in this commit.


Joe Flynn

July 18, 2015 at 5:28 am

As mentioned, we did try updating to the latest beta version prior to implementing our own jQuery fix, and the issue was still present with the latest beta version.

In addendum to the above, we did discover some bugs that our jQuery fix caused, so we have refined our fix to the following code, which after heavy testing, we can report works consistently and without bugs:

`jQuery(document).ready(function () {
setInterval(function () {
if (jQuery(‘#ee-spco-payment_options-reg-step-form’).is(‘:visible’)) {
jQuery(‘#ee-promotion-code-submit’).removeAttr(“disabled”);
jQuery(‘#ee-promotion-code-submit’).removeClass(“disabled”);
jQuery(‘#ee-promotion-code-submit’).removeClass(“spco-disabled-submit-btn”);
jQuery(‘#ee-promotion-code-submit’).click(function() {
setTimeout(function (){
var total = jQuery(‘#spco-payment-info-table tr:last-child td:last-child’).text().replace(/[^0-9]/gi, ”);
var totalnumber = parseInt(total, 10);
jQuery(‘#ee-stripe-transaction-total’).attr(‘value’, total)
}, 3000);
});
}
}, 1000);
});


Joe Flynn

July 18, 2015 at 5:28 am

jQuery(document).ready(function () {
	setInterval(function () {
		if (jQuery('#ee-spco-payment_options-reg-step-form').is(':visible')) {
			jQuery('#ee-promotion-code-submit').removeAttr("disabled");
			jQuery('#ee-promotion-code-submit').removeClass("disabled");
			jQuery('#ee-promotion-code-submit').removeClass("spco-disabled-submit-btn");
			jQuery('#ee-promotion-code-submit').click(function() {  
				setTimeout(function (){					
					var total = jQuery('#spco-payment-info-table tr:last-child td:last-child').text().replace(/[^0-9]/gi, '');
					var totalnumber = parseInt(total, 10);
					jQuery('#ee-stripe-transaction-total').attr('value', total)				
				}, 3000);
			});
		}
	}, 1000);
});


Josh

  • Support Staff

July 21, 2015 at 10:55 am

You can avoid the bugs from your jQuery modifications by testing the current betas of Event Espresso core and promotions availble from Github, along with the current stable version of Stripe. The versions on your site are out of date.

https://github.com/eventespresso/event-espresso-core/tree/BETA-4.8-CORE

https://github.com/eventespresso/EE4-Promotions


Josh

  • Support Staff

August 18, 2015 at 8:42 am

Update: The Promotions add-on for Event Espresso 4 is now available. This and the stable release of Event Espresso 4.8 should be used instead of what I earlier linked to from Github.

Viewing 24 reply threads

The support post ‘Coupons / Discount Codes not working’ 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