Support

Home Forums Event Espresso Premium Promotions that change an events ticket to a fixed price

Promotions that change an events ticket to a fixed price

Posted: October 30, 2024 at 7:58 am

Viewing 4 reply threads


weblinxinc

October 30, 2024 at 7:58 am

Exactly as this topic describes, we’d like the ability to offer a promo code that changes an events ticket to a fixed price. Is this possible?

https://eventespresso.com/topic/fixed-promotions-fee/


Tony

  • Support Staff

October 30, 2024 at 2:42 pm

Hi there,

No, this is not something we currently have available within EE at this time.


weblinxinc

November 15, 2024 at 1:37 pm

Are there any hooks that could be used to implement this with custom code? What I found was just the ability to apply a percentage discount.


Tony

  • Support Staff

November 19, 2024 at 4:56 am

To do this properly you’d need your own promotion ‘scope’.

Right now promotions have an event scope, meaning they apply on an event level.

What you are looking to do above is apply promotions using a ticket scope but then also calculate the promotion value applied to that ticket on the fly.

We have an example of applying promotions at a ticket level here:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-promotions/bc_ee_ticket_scope_promotions.php

But it is not an officially supported feature currently and the above doesn’t actually add a ticket scope, its filtering the applicable items to work with tickets.

When a promotion is applied by the add-on it is passed through the FHEE__EE_Promotion_Scope__generate_promotion_line_item filter which you should be able to use to apply the promotion value in the way you need to, but again, doing so is not something we officially support.

—-

We don’t have documentation onf creating custom scopes, but you register your own using the FHEE__EE_Promotions_Config___get_scopes__scopes_to_register hook.

Then take a look within /eea-promotions/lib/scopes/ to see how those classes work and create your own from there.

Does that help?


Tony

  • Support Staff

November 19, 2024 at 4:56 am

To do this properly you’d need your own promotion ‘scope’.

Right now promotions have an event scope, meaning they apply on an event level.

What you are looking to do above is apply promotions using a ticket scope but then also calculate the promotion value applied to that ticket on the fly.

We have an example of applying promotions at a ticket level here:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-promotions/bc_ee_ticket_scope_promotions.php

But it is not an officially supported feature currently and the above doesn’t actually add a ticket scope, its filtering the applicable items to work with tickets.

When a promotion is applied by the add-on it is passed through the FHEE__EE_Promotion_Scope__generate_promotion_line_item filter which you should be able to use to apply the promotion value in the way you need to, but again, doing so is not something we officially support.

—-

We don’t have documentation onf creating custom scopes, but you register your own using the FHEE__EE_Promotions_Config___get_scopes__scopes_to_register hook.

Then take a look within /eea-promotions/lib/scopes/ to see how those classes work and create your own from there.

Does that help?

Viewing 4 reply threads

The support post ‘Promotions that change an events ticket to a fixed price’ 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