Skip to content

How to show selected pickup point in order notifications?

To show pickup point information in your order notifications, follow these steps to modify the notification template.

  1. Navigate to Settings > Notifications > Customer notifications
  2. Select Order confirmation
  3. Click Edit code

Find this line in your template:

{{ shipping_address | format_address }}

Replace it with following:

{% if shop.metafields.atlas_pickup_points.rate_names contains shipping_method.title %}
{% assign pickup_point = metafields.atlas_pickup_points.point %}
{% if pickup_point %}
<p>
{{ pickup_point.details.name }} - {{ pickup_point.code }}
<br/>
{{ pickup_point.address.address1 }}
<br/>
{{ pickup_point.address.zip }} {{ pickup_point.address.city }}
<br/>
{{ shipping_address.country }}
</p>
{% endif %}
{% else %}
{{ shipping_address | format_address }}
{% endif %}

If you want to show pickup point information in other order notifications (like Shipping confirmation, Order cancelled etc.), repeat these steps to update those templates as well.

How it works

The code follows this logic:

  1. First, checks if the shipping method matches any pickup point configuration

    • Uses contains to search within our configuration metafield
  2. If there is a match:

    • Retrieves the pickup point data from our pickup point metafield
    • If pickup point data exists:
      • Shows the pickup point details (name, code, address)
    • If no pickup point data:
      • Shows nothing to avoid confusion
  3. If there is no match:

    • Falls back to displaying the standard shipping address
    • Uses the default format_address filter

This change allows order notifications to dynamically show pickup point information when applicable.