Posted: March 2, 2020 at 11:31 am
|
Hi, we very much need to limit coupons to specific tickets without having to set up a completely different event. I am aware that this is currently a feature on the request board and is not yet on the roadmap. Is there any possible workaround for this? I am willing to code it (for my customer) if given some guidance on the feasibility of it. |
Hi, This can be coded by following the example in this snippet: You can add the above to a functions plugin then modify to your customer’s specifications. |
|
|
Awesome, thanks, Josh! The ticket id to include in the array, is the ticket id shown under the advanced settings of the ticket? Also, would it be possible to add a custom field to the promotion record where a user could specify a simple comma-delimited list of tickets to be included? Do you see any issues with that? (I realize that is not how you would want to implement in a product just want a way that I don’t have to hard-code it for my customer.) |
Yes, click on the icon and in the bottom left you’ll have something like “Ticket ID: 12076” That’s the Ticket ID.
Possible, yes, but adding an input to the promotion create/edit page currently isn’t expected so there are no hooks for it, you would need to override the template used with your own. You could store the values in Extra_Meta.
None of the top of my head but general disclaimer here, I haven’t gone through planning/testing for this to work, it should be fine but something may come up that I/We haven’t thought of. Another user used the ticket names to determine if promotions should apply to is here: https://eventespresso.com/topic/promo-code-for-specific-ticket-types/ They are chacking for tickets with the name ‘Regular’ and apply promotions to that, would something like that work for you here? |
|
|
Great, got this working. Thanks so much for your help! Would love to see this functionality added to the promotions addon in the future! |
You’re most welcome. We do have plans to add a ticket ‘scope’ to the promotions add-on (meaning you can apply promotions to specific tickets) in the future. Just to note, we are currently working on other areas of the plugin so it will not be something we release ‘soon’. |
|
The support post ‘Apply coupon to specific ticket’ 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.