Adding the what3words Shopify app

easy

The what3words Shopify app allows a what3words address field to be added to a Shopify store. Customers can then provide a what3words address with orders for faster and more reliable deliveries.

1Add app to your Store

Add a what3words address field to your checkout page on Shopify by clicking this button below

Install

2Select your theme (instructions will show based on theme selected)

Installation process

1. Go to the what3words app on the Shopify app store and click on Install

2. From your Shopify admin, go to Online Store > Themes

3. Click Customize

4. Navigate to the Cart page

5. Under Apps, select Add Block > what3words Widget

6. Drag the what3words app block so it’s above the checkout button on the Cart page

7. Click the I have completed the steps button to finalise the installation.

Note: You can now add the what3words address to your cart drawer page instead of your cart page by following these easy steps:

1. From your Shopify admin, go to Online Store > Themes

2. Click … > Edit code

3. In the Templates directory, click cart-drawer.liquid. Find a suitable place in your theme where you want to use the widget and insert the following code shown below. We recommend placing it above the customer note or checkout button:

<div id="w3w___container" data-alignment="right" data-width="350px"></div>

data-alignment is used to align the field to the right, left, or center
data-width is used to specify the width of the field, e.g. 350px.

3Customisation and extra features

There are a number of settings that can be altered via the “Settings” page of the app:

Enable what3words field: By default the what3words address field will be visible on your site. Uncheck this to remove the what3words field.

Enable tooltip: By default an (i) icon will appear next to the field with a tooltip to explain what3words and a link to the what3words Map Site. Uncheck this to remove the icon and tooltip.

Custom field label: By default the field label is what3words address (optional). We recommend keeping this as is but it can be changed if desired.

Custom placeholder: Changes the placeholder text of the field.

AutoSuggest Focus: If the website knows the user’s location then use the location to provide better what3words address suggestions.

Add what3words address to your Order Notes: You can easily add the what3words address as an optional note that a shop owner can attach to the order. Currently, the what3words address is added by default as extra information in the Additional details section of an order details page.

Clipping options: Restrict suggestions to a country, circle, bounding box, or polygon

Settings page

The what3words address is saved against an order within the Additional Details section of the order page. This can then be printed on order summaries or exported with orders to pass on to delivery companies.

Orders Admin page

  1. Go to the Dashboard of the plugin.
  2. From your Shopify admin, go to Settings > Notifications > Order confirmation.
  3. Find the Liquid variable {{ shipping_address | format_address }} that references the shipping address.
  4. Insert this code immediately below:
    {% if attributes["what3words address"] %} 
       <h4>what3words address</h4> 
       <p>{{ attributes["what3words address"] }}</p> 
    {% endif %}
  1. Go to the Dashboard of the plugin.
  2. From your Shopify admin, go to Settings > Notifications > Order confirmation.
  3. Find the Liquid variable {{ shipping_address | format_address }} that references the shipping address.
  4. Insert this code immediately below:
    {% if attributes["what3words address"] %} 
        <h4>what3words address</h4> 
      <p>{{ attributes["what3words address"] }}</p> 
    {% endif %}

Note: This section is for customers that would like to share the what3words address of each order with Order Management Systems.

In Shopify, the what3words address attributes are stored in the customers’ orders of the Shopify Orders REST API as note_attributes and also as note.

For more information on how endpoints and requests to the Shopify REST ADMIN API, please follow this guide.

The API request to make to the Shopify Orders REST API should be:
GET {{your-shopify-site}}/admin/api/2022-07/orders/{{your-order-number}}.json

The API response should be:

"note": "what3words address: ///filled.count.soap"
"note_attributes": [{
    "name": "what3words address",
    "value": "filled.count.soap"
}]

Another way to display easily what you can retrieve from the Shopify REST ADMIN API is by going to the
Admin page > Orders > (number of order) and adding at the end of this path .json.

For example: https://<your-store-site>.myshopify.com/admin/orders/4253206970468.json.

Search for note and note_attributes, your what3words address will be stored within this parameter.

Note: By attaching what3words address to the note the store owner can now print shipping labels and packaging slips with the what3words address as a note of the order.

Shopify Orders API

Troubleshooting

If you are stuck with the installation of our plugin or are using a custom theme, you can give our support team collaborator access to your Shopify admin directly through your own Partner Dashboard or using the Shopify app. These collaborator permissions give our support team access to only the sections of your store that you want us to see.

Only the store owner or staff with Manage collaborator requests permission, can view collaborator access requests or grant collaborator access to a store.

Otherwise, contact our support team they will be able to submit a request to access your store, and you will receive an email about the request and a notification on your Shopify Home. Please make sure you mentioned your store website.

Alternatively, if you have a collaborator request code enabled, then you need to provide the collaborator request code to our support team.

Recommended Shopify tutorials

View all tutorials