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.
- Navigate to Settings > Notifications > Customer notifications
- Select Order confirmation
- Click Edit code
Find this line in your template:
Replace it with following:
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:
-
First, checks if the shipping method matches any pickup point configuration
- Uses
contains
to search within our configuration metafield
- Uses
-
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
-
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.