Jump to content

Style Eventbrite button to match site buttons (or add script to site button)

Recommended Posts

Site URL: https://www.livewireradio.org/events/20200121

I'm trying to add scripted Eventbrite ticket sales buttons to our events and would like to style them the same as the buttons already on our site but can't figure out how to do it. I'm hoping I can either use a squarespace button and have it run the script below from Eventbrite, or format the button the Eventbrite code generates to the look the same as the others. 

Password for site: SSForum

The first button is the standard squarespace button with a link.  

The second button is a scripted button using the code below from Eventbrite. We'd much prefer to use the scripted button that  brings up a modal for ticket sales but want the style to match the first button on the page. 

Here is the code we have for the scripted button: 

Quote

<!-- Noscript content for added SEO -->
<noscript><a href="https://www.eventbrite.com/e/happy-hour-with-luke-elena-january-tickets-135561675621" rel="noopener noreferrer" target="_blank"></noscript>
<!-- You can customize this button any way you like -->
<button id="eventbrite-widget-modal-trigger-135561675621" type="button">Buy Tickets</button>
<noscript></a>Buy Tickets on Eventbrite</noscript>

<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"></script>

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

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

Appreciate your help! 

Link to comment
  • Replies 4
  • Views 3.6k
  • Created
  • Last Reply

Very well explained.

I've updated your code. Please let me know if that solves your problem.

<!-- Noscript content for added SEO -->
<noscript><a href="https://www.eventbrite.com/e/happy-hour-with-luke-elena-january-tickets-135561675621" rel="noopener noreferrer" target="_blank"></noscript>
<!-- You can customize this button any way you like -->
<button id="eventbrite-widget-modal-trigger-135561675621" class="sqs-block-button-element--medium sqs-block-button-element" type="button" style="border:none;">Buy Tickets</button>
<noscript></a>Buy Tickets on Eventbrite</noscript>

<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"></script>

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

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

 

Link to comment
  • 4 months later...

Site URL: https://www.londonwanders.com/

Hello

I would be really grateful if someone out there could help me please. I know nothing about coding, except how to cut and paste it! This same question was asked on here back in January:
https://forum.squarespace.com/topic/178202-style-eventbrite-button-to-match-site-buttons-or-add-script-to-site-button/


But as I do not understand coding, I am really hoping, given the information below, that someone would kindly give me the code I need for my site. Thank you. Here’s the details:

I’ve added a scripted Eventbrite ticket sales button to my website, which keeps customers on your website to make the booking, rather than linking to the external eventbrite page. This is a new and better way of doing things. BUT the E’brite “buy tickets” button looks terrible. I would like to style it the same as the red “book/book now” buttons already on my site. These buttons are links to the E’brite site. If I can style the scripted Eventbrite "buy tickets" button to look like the others, then I can replace the S'space link buttons with the E'brite scripted embedded ones.

On the “welcome” page of my site you will see the E’brite scripted “buy tickets” button and below this the standard Squarespace “book now” button. I also attach a screen grab.

Here is the code for the scripted button, and below that the styling details of my red squarespace button: 
<!-- Noscript content for added SEO -->

<noscript><a href="https://missguideds-londonwanders.eventbrite.co.uk" rel="noopener noreferrer" target="_blank"></noscript>

<!-- You can customize this button any way you like -->

<button id="eventbrite-widget-modal-trigger-18924204806" type="button">Buy Tickets</button>

<noscript></a>Buy Tickets on Eventbrite</noscript>

 

<script src="https://www.eventbrite.co.uk/static/widgets/eb_widgets.js"></script>

 

<script type="text/javascript">

    var exampleCallback = function() {

        console.log('Order complete!');

    };

 

    window.EBWidgets.createWidget({

        widgetType: 'checkout',

        eventId: '18924204806',

        modal: true,

        modalTriggerElementId: 'eventbrite-widget-modal-trigger-18924204806',

        onOrderComplete: exampleCallback

    });

</script>

Styling details of my red Squarespace button:-
Button block               small
Button colour              hsla(352, 94%, 49%, 0.85)
Text colour                  hsla(0, 1%, 7%)
Small button style       solid
Small button shape      pill
Font                             Proxima Nova
Weight                        700
Style                            normal
Size                             16px
Letter spacing             1.58px
Text transform            lowercase

 

If anyone can help I’ll be incredibly grateful. Thank you very much!

buttons.JPG

Link to comment
13 hours ago, LL77 said:

Site URL: https://www.londonwanders.com/

Hello

I would be really grateful if someone out there could help me please. I know nothing about coding, except how to cut and paste it! This same question was asked on here back in January:
https://forum.squarespace.com/topic/178202-style-eventbrite-button-to-match-site-buttons-or-add-script-to-site-button/


But as I do not understand coding, I am really hoping, given the information below, that someone would kindly give me the code I need for my site. Thank you. Here’s the details:

I’ve added a scripted Eventbrite ticket sales button to my website, which keeps customers on your website to make the booking, rather than linking to the external eventbrite page. This is a new and better way of doing things. BUT the E’brite “buy tickets” button looks terrible. I would like to style it the same as the red “book/book now” buttons already on my site. These buttons are links to the E’brite site. If I can style the scripted Eventbrite "buy tickets" button to look like the others, then I can replace the S'space link buttons with the E'brite scripted embedded ones.

On the “welcome” page of my site you will see the E’brite scripted “buy tickets” button and below this the standard Squarespace “book now” button. I also attach a screen grab.

Here is the code for the scripted button, and below that the styling details of my red squarespace button: 
<!-- Noscript content for added SEO -->

<noscript><a href="https://missguideds-londonwanders.eventbrite.co.uk" rel="noopener noreferrer" target="_blank"></noscript>

<!-- You can customize this button any way you like -->

<button id="eventbrite-widget-modal-trigger-18924204806" type="button">Buy Tickets</button>

<noscript></a>Buy Tickets on Eventbrite</noscript>

 

<script src="https://www.eventbrite.co.uk/static/widgets/eb_widgets.js"></script>

 

<script type="text/javascript">

    var exampleCallback = function() {

        console.log('Order complete!');

    };

 

    window.EBWidgets.createWidget({

        widgetType: 'checkout',

        eventId: '18924204806',

        modal: true,

        modalTriggerElementId: 'eventbrite-widget-modal-trigger-18924204806',

        onOrderComplete: exampleCallback

    });

</script>

Styling details of my red Squarespace button:-
Button block               small
Button colour              hsla(352, 94%, 49%, 0.85)
Text colour                  hsla(0, 1%, 7%)
Small button style       solid
Small button shape      pill
Font                             Proxima Nova
Weight                        700
Style                            normal
Size                             16px
Letter spacing             1.58px
Text transform            lowercase

 

If anyone can help I’ll be incredibly grateful. Thank you very much!

buttons.JPG

Add to Design > Custom CSS

/* Buy tickets button */
button#eventbrite-widget-modal-trigger-18924204806 {
    font-family: proxima-nova;
    font-size: 16px;
    font-weight: 700;
    font-style: normal;
    text-transform: lowercase;
    letter-spacing: 1.58px;
    color: #121212;
    background-color: rgba(242,7,39,.85);
    border-color: rgba(242,7,39,.85);
    padding: 10px;
    border-radius: 100px;
    box-shadow: none !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.