Adding 'Local Pickup' to show in new Shopify Order Printer template

Adding 'Local Pickup' to show in new Shopify Order Printer template

thadwinzenz
New Member
7 0 0

How do we update one of our Shopify Order Printer templates to indicate if an order is for 'Local Pickup'.

 

When we print out online orders in bulk for picking, it is really nice to have 'LOCAL PICKUP' indicated (we had this on the previous order printer version) so those orders can be handled differently from the shipping orders.

 

In the template I have tried a few variations, but no luck yet. Any guidance or tips out there? I don't know liquid code all that well but can troubleshoot a bit.

 

Thanks in advance for any guidance.

Replies 2 (2)

DaisyVo
Shopify Partner
2848 343 401

Hi @thadwinzenz 

Adding "LOCAL PICKUP" to your Shopify Order Printer template is straightforward if you adjust the Liquid code in your template. This involves checking if the order has a pickup option and displaying the appropriate label. Here's how you can do it:

Steps to Add "LOCAL PICKUP" to Your Order Printer Template:

1-Access the Order Printer App:
Go to your Shopify admin, open the Order Printer app, and select the template you want to modify.

2-Edit the Template:
Look for the section of the template where you want "LOCAL PICKUP" to appear (e.g., near the order details or shipping address).

Insert Liquid Code to Check for Local Pickup:
Add the following code snippet to your template:

{% if fulfillment_order.pickup_in_store == true %}

  <p style="font-weight: bold; color: red;">LOCAL PICKUP</p>

{% endif %}

Alternatively, if the pickup flag is under a different attribute (depending on your Shopify setup), use:
liquid
CopyEdit
{% if attributes.delivery_method == 'local_pickup' %}

  <p style="font-weight: bold; color: red;">LOCAL PICKUP</p>

{% endif %}

 

3-Test the Template:
Save the changes and preview your template using an order that has "Local Pickup" selected. If it displays as expected, you're good to go. If not, double-check the attribute names in the Liquid code (these can vary depending on your setup).

4-Troubleshooting:
If the label doesn't appear:

  • Go to the admin order details page and inspect the order attributes (e.g., delivery_method or pickup_in_store) to ensure you're referencing the correct variable.
  • Use {{ attributes | json }} in the template to display all available attributes, helping you identify the correct one for Local Pickup.

Example Output for "Local Pickup":

When the above code works correctly, orders with local pickup will show this label prominently:

LOCAL PICKUP
(Order details continue...)

If you’re not comfortable with Liquid or need a bit more help, feel free to share the attributes you see in your JSON output. I'll help refine the code further!

If you need any other assistance, feel free to reply and I will try my best to respond.
Best regards,
Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
thadwinzenz
New Member
7 0 0

I tried multiple variations of this with no luck...but I appreciate the knowledge and guidance. This helped me get pointed in the right direction with the Liquid variables.

 

Ultimately the code that worked for us was:

 

{% if order.shipping_method.title == 'Bird in Hand' %}
  <div style="text-align: center;"><span style="font-size: 14pt;">Local Pickup at</span><br>{{ order.shipping_method.title }}</div>
{% endif %}

 

Apparently the local pickup option is a 'shipping method' and the title for the shipping method is the name of the store/location where the pickup is to happen.

 

Thad