Add a Vendor to the New Order template email

Solved
Highlighted
Tourist
4 0 1

Hi there

This must be very easy to do, but I'm clueless with coding.

 

What we have now:

At the moment we have this piece of code, but we have more vendors now.

In the example below I've replaced the name of our vendor with VENDORNAME

<p></p>
{% capture VENDORNAME_check %}{% for line in line_items %} {{ line.product.vendor }} {% endfor %}{% endcapture %}
{% if VENDORNAME_check contains 'VENDRONAME' %}
<p><b>For Supplier:</b></p>
<p>VENDORNAME</p>

 

What we want:

Just above the first product line show the vendor name for the products for that specific Vendor then list the the products below.

Then a space and then the second vendor with the products below

The rest of the email should stay the same.

 

Supplier: VENDORNAME1

Product 1

Product 4

 

Supplier: VENDORNAME2

Product 2

Product 3

 

I hope I've been clear.

 

Your help is much appreciated!

MJN

 

 

0 Likes
Highlighted
Shopify Partner
242 59 113

Hi @MJN,

 

Welcome to the Shopify Community!

 

I understand that you want to show each vendor name with the products for each listed below its name. The rest of the email should stay the same.

 

I may be able to help you with this. Will you copy/paste the entire contents of your New Order template email here?

 

Cheers!

Brian | Shopify Partner | Ecommerce Consultant
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution  
 - Need further assistance? Visit www.BrianAtWork.com

1 Like
Highlighted
Tourist
4 0 1

Hi @BrianAtWork 

Thank you for your help in advance!

Here is the template.

 

<p>Hello {{ shop_name }},</p>
<p></p>
<p>{% if customer.name %}{{ customer.name }}{% else %}Someone{% endif %} placed a new order with your store, {{ date | date: "%b %d %I:%M%p" }}:</p>
<p></p>
<ul> {% for line in line_items %} <li> <img src="{{ line | img_url: 'thumb' }}" /> {{ line.quantity }}x {{ line.title }} {% if line.sku != "" %}(SKU: {{line.sku}}){% endif %} for {{ line.price | money }} each </li> {% endfor %} </ul>
<a href="https://{{ shop.permanent_domain }}/admin/orders/{{ id }}">View order {{order_name}} </a>
{% if fulfillment_aborted %}
<p>The above order was not automatically fulfilled because it was flagged as suspicious.</p>{% endif %}
<p><a target='_blank' href='https://radiusshop.co.nz/apps/download-pdf/95faeb9c6436465597c1/{{ id | times: 6887 }}/{{ order_number | default: number }}.pdf'>Download Invoice/Receipt</a></p>
<p></p><br>
{% if has_high_risks? %}<p><b>Security check:</b></p>
<p>This order has a risk of being fraudulent. Review the order in your store's admin and contact the customer to verify their information.</p>
<p></p>{% endif %}
<p><b>Payment processing method:</b></p>
<p>{{ gateway }}</p>
<p></p>
{% capture cubro_check %}{% for line in line_items %} {{ line.product.vendor }} {% endfor %}{% endcapture %}
{% if cubro_check contains 'Cubro' %}
<p><b>For Supplier:</b></p>
<p>Cubro</p>
{% endif %}
{% if requires_shipping and shipping_address %}
<p><b>Delivery method:</b></p>
{% for shipping_method in shipping_methods %}<p>{{ shipping_method.title }}</p>{% endfor %}
<p></p>
<p><b>Shipping address:</b></p>
<p>{{ shipping_address.company }}</p>
<p>{{ shipping_address.name }}</p>
<p>{{ shipping_address.street }}</p>
<p>{{ shipping_address.city }}, {{ shipping_address.province }} {{ shipping_address.zip }}</p>
<p>{{ shipping_address.country }}</p>
<p>{{ shipping_address.phone }}{% endif %}</p>
<p></p>

{% unless note == blank %}
<p><b>Notes:</b></p>
<p>{{ note }}</p>
{% endunless %}

{% if shopify_shipping_enabled %}
<p>Save time and money by <a href="{{ fulfillment_url }}">fulfilling with Shopify Shipping</a></p>
<p></p>
{% endif %}

0 Likes
Highlighted
Shopify Partner
242 59 113

This is an accepted solution.

Hi @MJN,

 

You're most welcome! Give this a try:

 

<p>Hello {{ shop_name }},</p>
<p></p>
<p>{% if customer.name %}{{ customer.name }}{% else %}Someone{% endif %} placed a new order with your store, {{ date | date: "%b %d %I:%M%p" }}:</p>
<p></p>
{% for line_item in line_items %}
  {% unless vendors_list contains line_item.product.vendor %}
    {% capture vendors_list %}{{ vendors_list }}{% endcapture %}
    {% assign vendors_list = vendors_list | append: line_item.product.vendor | append: "," %}
  {% endunless %}
{% endfor %}
{% assign size = vendors_list | size | minus: 1 %}
{% assign vendors_list = vendors_list | slice: 0, size %}
{% assign vendors_list = vendors_list | split: "," %}
{% for vendor in vendors_list %}
  <p><b>Supplier: {{ vendor }}</b></p>
  <ul>
  {% for line_item in line_items %}
    {% if line_item.product.vendor == vendor %}
      <li> <img src="{{ line_item | img_url: 'thumb' }}" /> {{ line_item.quantity }}x {{ line_item.title }} {% if line_item.sku != "" %}(SKU: {{line_item.sku}}){% endif %} for {{ line_item.price | money }} each </li>
    {% endif %}
  {% endfor %}
  </ul>
{% endfor %}
<a href="https://{{ shop.permanent_domain }}/admin/orders/{{ id }}">View order {{order_name}} </a>
{% if fulfillment_aborted %}
<p>The above order was not automatically fulfilled because it was flagged as suspicious.</p>{% endif %}
<p><a target='_blank' href='https://radiusshop.co.nz/apps/download-pdf/95faeb9c6436465597c1/{{ id | times: 6887 }}/{{ order_number | default: number }}.pdf'>Download Invoice/Receipt</a></p>
<p></p><br>
{% if has_high_risks? %}<p><b>Security check:</b></p>
<p>This order has a risk of being fraudulent. Review the order in your store's admin and contact the customer to verify their information.</p>
<p></p>{% endif %}
<p><b>Payment processing method:</b></p>
<p>{{ gateway }}</p>
<p></p>
{% capture cubro_check %}{% for line in line_items %} {{ line.product.vendor }} {% endfor %}{% endcapture %}
{% if cubro_check contains 'Cubro' %}
<p><b>For Supplier:</b></p>
<p>Cubro</p>
{% endif %}
{% if requires_shipping and shipping_address %}
<p><b>Delivery method:</b></p>
{% for shipping_method in shipping_methods %}<p>{{ shipping_method.title }}</p>{% endfor %}
<p></p>
<p><b>Shipping address:</b></p>
<p>{{ shipping_address.company }}</p>
<p>{{ shipping_address.name }}</p>
<p>{{ shipping_address.street }}</p>
<p>{{ shipping_address.city }}, {{ shipping_address.province }} {{ shipping_address.zip }}</p>
<p>{{ shipping_address.country }}</p>
<p>{{ shipping_address.phone }}{% endif %}</p>
<p></p>

{% unless note == blank %}
<p><b>Notes:</b></p>
<p>{{ note }}</p>
{% endunless %}

{% if shopify_shipping_enabled %}
<p>Save time and money by <a href="{{ fulfillment_url }}">fulfilling with Shopify Shipping</a></p>
<p></p>
{% endif %}

Let me know if this solves your problem or if you need further help!

Brian | Shopify Partner | Ecommerce Consultant
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution  
 - Need further assistance? Visit www.BrianAtWork.com

0 Likes
Highlighted
Tourist
4 0 1

Fantastic @BrianAtWork, thank you so much.

I just removed the part below to prevent duplication.

Else it is working well!

Thanks again!

MJN

 

<p></p>{% capture cubro_check %}{% for line in line_items %} {{ line.product.vendor }} {% endfor %}{% endcapture %}
{% if cubro_check contains 'Cubro' %}<p><b>For Supplier:</b></p>
<p>Cubro</p>{% endif %}

 

1 Like
Highlighted
New Member
1 0 0

<p> Thanks {{ customer.first_name }} for supporting local business through the Kawartha Chamber of Commerce and Tourism online shop.</p>
<br>
<p>This is your gift certificate. Please present this at the time of purchase in store.</p>
<br>
<p>Store Name: {{ line.line_item.title }}<br>
Amount: $25.00<br>
Date Purchased: {{created_at}}<br>
Gift Certificate Number:</p>
<br>
<p>If you have any questions about redeeming your eCard, please contact the store directly.</p>
<br>
<p>Once again, thank you for your support of local business.</p>
<br>
<p>Sincerely,<br>
The Kawartha Chamber of Commerce</p>
<p style="display:none;">{{ custom_message }}</p>

0 Likes
Highlighted
Shopify Staff
Shopify Staff
291 3 59

Hi,

My name’s Jordan and I’m a product manager on the orders team here at Shopify. I hope you don’t mind me following up here, but I wanted to share with you that we’re planning on making some improvements to that email notification. There’s no denying it’s outdated and could use a design uplift, but I’m curious how you find it useful? Do you use for it anything specific outside of just being notified of a new order? Is there anything you’d like to see changed with it?

If you're not too busy to reply, it'd be great to connect and hear your feedback so I can share it with the team.

All the best,

Jordan

0 Likes
Highlighted
Tourist
4 0 1

Hi Jordan

Thank you for asking

We sell many products on our website and 1 customer will often order from more than 1 Vendor.

Which means we have to keep an eye on that email which contains several Vendors and then send these emails to each dropshipping Vendor separately

(for reasons beyond our control at this stage, we can't use automatic fulfilment for all our vendors).

 

  • The first and biggest issue is that it isn't possible for people who don't know how to code to edit these notifications.
    It is highly frustrating to have to get an expert to help with something very basic such as changing an email.
    This should include all the obvious settings, such as attach invoice link to download pdf version etc.
    So if you could make it possible to have an option to edit these notifications without coding, that would work great.
  • What will help us is if we could have more functionality in Shopify to make the notification Vendor-specific with the option to send it/or not to the Vendor's designated email address from within Shopify automatically or not.  (just the notification, not to do automatic fulfilment).
    It must only go to the This must only happen when the order is paid in full.
    We have bank deposit as an option and these will only go to the Vendor(s) once payment has been confirmed (we mark it as paid)

    We also need to get an email in the shop's inbox with the full order details (as it is working now).

    The customer should still get the info they usually do as it is working at the moment.
  • The options above should also be available to turn on and off when we create a draft order in the background.
    We get orders over the phone or when customers come in to buy something in the shop.
    At this stage we don't have POS operational and prefer to use draft orders for this purpose.

I think this covers the ideas I have for now. Thank you!

MJ

0 Likes
Highlighted
Tourist
5 0 1

Hi!

Hope you are doing well! I am facing a problem adding details of each vendor on my store. How can I add the address of each vendor so that this email reaches them?

0 Likes
Highlighted
Tourist
5 0 1

Hi Jordon,

My team needs to send order confirmation emails to different vendors. Our customers can order products from multiple vendors. We need to inform each vendor only about the order of their product. If you could add an easy way to send vendor-specific emails, it would be great!

0 Likes