Xola provides a default book now button that is styled to work well with most site layouts and themes. Follow the instructions below if the default book now button does not work with your site.
The Xola button is a small application that runs when your web page is loaded into a browser. Everything that you need to set it up is located on the SETTINGS -> Button Code page in your Xola Dashboard.
What makes the Xola Button work:
- The Checkout Type - Select the options for how you want the Xola button to work on your site.
- The Button Code - A line of HTML code for you to copy and paste into your site HTML.
- Your site CSS - The custom button style is defined in your site CSS file.
Warning: Customizing the Xola Button requires editing your web site.
Please involve you web developer if you are not comfortable with making these changes yourself.
The Button Code Settings Page
- Checkout Type: Select the type of checkout button for your site. The button type will determine how the button behaves once it is pushed. When the Default style is selected, Xola produces the green Book Now button. Select Custom in order to customize how the button will look on your site.
- Button HTML: Depending on your selection above, Xola will generate a block of HTML that you can copy and paste into your site where you want each button. For our example, we want one button for all of our listings.
Note: Xola recommends using a button generator tool to create the CSS code to style your button.
Scenario: On our new site, all of the buttons on the page are blue and the default green button looks out of place. Follow along to see how we change the button from green to blue.
We used a button generator to style the button to match our site.
And copied the CSS code that it generated:
box-shadow: inset 0px -3px 7px 0px #29bbff;
background: linear-gradient(to bottom, #2dabf9 5%, #0688fa 100%);
border: 1px solid #0b0e07;
padding: 15px 25px;
text-shadow: 0px 1px 0px #263666;
background: linear-gradient(to bottom, #0688fa 5%, #2dabf9 100%);
Remember when you selected Custom for the button type in step 2? That selection modified the button HTML to include a class named "xola-custom" into the HTML.
One last step and we are done setting up. The default Xola button uses an image for the button checkmark and text. You can create an image for your button or you can put text into the button HTML like we have below.
<div class="xola-checkout xola-custom"
The CSS class that you define for the button style must match.
Using the custom button on your site
Now we are ready to use the custom button on your site.
- Configure the button in your Xola settings
- Create a custom style for your button with a CSS class name that includes xola-custom.
- Copy the button HTML from the button settings page
- Paste the button HTML into your web site HTML
Note: Xola recommends developing your button code using a sandbox or test web site. Do not edit your production web site directly.
We know that this is a lot to take in all at once, so we mocked up the button for you to see in action using the JSFiddle web prototyping site.
Save all of your web development work and publish your site to see the new button in action.
Want to know more about checkout? Check out our article, Types of Checkout.