Different buttons for different tickets

43 views
Skip to first unread message

K S

unread,
Oct 1, 2021, 7:21:03 PM10/1/21
to Eventbrite Developers
I would like to have one button visible to my members that opens the checkout with the free ticket already selected.  Then, non-members would see a different button with only the paid ticket option.  (I use a membership plugin on Wordpress to differentiate between members and non-members.)

1. What should I add to my embed code (button version) to accomplish this?
2. Do I need to set both tickets to "hidden" in Eventbrite first?

Thank you.

K S

unread,
Oct 1, 2021, 7:25:54 PM10/1/21
to Eventbrite Developers
Here is the code I am using for the button right now (with promo code and full URL redacted):

<!-- Noscript content for added SEO -->
<noscript><a href="https://www.eventbrite.com/e/eventid" rel="noopener" noreferrer"="" target="_blank"></a></noscript><a href="https://www.eventbrite.com/e/eventid" rel="noopener" noreferrer"="" target="_blank">
<!-- You can customize this button any way you like -->

<style>
.button {
line-height: 1.8em;
font-size: 25px;
color: #fff;
background-color: #3366ff;
border: 2px solid #3366ff;
border-radius: 10px;
padding: 20px 35px;
-moz-transition: all 0.2s;
-webkit-transition: all 0.2s;
transition: all 0.2s;
cursor: pointer;
}

.button:hover {
background-color: #fff;
color: #3366ff;
border: 2px solid #3366ff;
border-radius: 10px;
padding: 20px 35px;
}
</style>

</a><p align="center"><a href="https://www.eventbrite.com/e/eventid" rel="noopener" noreferrer"="" target="_blank">
<button id="eventbrite-widget-modal-trigger-eventid" class="button">Register</button>
</a><noscript><a href="https://www.eventbrite.com/e/eventid" rel="noopener" noreferrer"="" target="_blank"></a>Register on Eventbrite</noscript>


<script type="text/javascript">
    var exampleCallback = function() {
        console.log('Order complete!');
    };

    window.EBWidgets.createWidget({
        promoCode: 'code',
        widgetType: 'checkout',
        eventId: 'eventid',
        modal: true,
        modalTriggerElementId: 'eventbrite-widget-modal-trigger-id',
        onOrderComplete: exampleCallback
    });
</script>
</p>

Reply all
Reply to author
Forward
0 new messages