Skip to main content
All CollectionsFAQ's
How To Add Code To Your Shopify Theme For Accelerated Checkout Buttons
How To Add Code To Your Shopify Theme For Accelerated Checkout Buttons

Accelerated Checkout Button Setup

Updated over 4 months ago

This guide will walk you through the steps to modify your Shopify theme's code to ensure that Accelerated Checkout buttons work seamlessly in UpCarts updated Express Payment Module.

Refer to Shopify's Documentation

Before proceeding, we recommend familiarizing yourself with Shopify's official documentation on how to edit your theme code. This will help you navigate the code editor smoothly. In addition, the documentation will highlight some of the risks of editing theme code.

Step 1: Access Your Theme Code

  1. Open the Shopify Admin Dashboard
    From your Shopify dashboard, go to Online Store > Themes.
    ​

  2. Open the Code Editor
    Next, click on Actions for your current theme, then select Edit Code.

Step 2: Open the Layout Folder

  1. In the code editor, locate the layout folder on the left sidebar.

  2. Find and open a file called theme.liquid.

Step 3: Locate the <body> Tag

  1. In the theme.liquid file, search for the line that contains <body.
    This is typically near the middle of the file. An easy way to find it is to search using (Command or Ctrl) + F and look for <body.

Step 4: Add the Code

  1. Directly below the line with <body>, add the following code:

    {% if additional_checkout_buttons %}
    <div style="display: none !important">
    {{ content_for_additional_checkout_buttons }}
    </div>
    {% endif %}
  2. Format Liquid, this will make it look nicer.

  3. Save the changes.

Step 5: Test Your Changes

  1. Go to your storefront and check the functionality of the Accelerated Checkout buttons.
    Ensure that everything displays and works as expected while the module is updated and enabled.

Did this answer your question?