Skip to main content

Overview

We’ll create a button that customers can use to launch Subtotal Link from your Shopify store and link their accounts.

Edit the code in your Shopify theme

Sign in to Shopify Admin. Navigate to Online Store -> Themes -> Edit Code. shopify edit code

Create a custom button

Create a new file called link_account_button.liquid and customize your button using Liquid. Here’s an example of a simple Link your Walmart account button.
Make sure you update the href to a Link URL from your Subtotal Dashboard. Include the customer_id query paremeter to ensure that any new connection is associated with this Shopify customer.
<!-- Minimal Subtotal Link Button -->
{% if customer %}
  <!-- Replace NryQamtd with your Link URL from the Subtotal Dashboard -->
  <a href="https://link.subtotal.com/NryQamtd?customer_id={{ customer.id }}" >
    Link your Walmart Account
  </a>
{% endif %}

{% schema %}
{
  "name": "Subtotal Link Button",
  "settings": [],
  "presets": [
    {
      "name": "Subtotal Link Button"
    }
  ]
}
{% endschema %}

Add the button to your Shopify store

Customize your Store’s theme and add the Subtotal Link Button to any page.