Display Incoming Transfer Date on the New Order Confirmation?

We created a pre-order product page template, and on this page we display the date for the incoming stock/transfer. Customers can then purchase and are aware that it is not available until that particular date.

This is working well, however, due to delays we sometimes have to adjust this date and we would like to have some record of what date was displaying at the time a customer purchased.

I had an idea to add the date to the New Order confirmation, next to the particular product, so that if we need to refer back we can just find the date that was stated in our emails.

I’ve obviously gone to the New Order confirmation code and tried to add the date code, in various ways, but failed.

If anyone could assist in providing the correct code to add this, or has any other ideas, it would be extremely helpful!

Hannah

1 Like

Not tested yet, but this should do the trick in your email template, in the for loop for the line items, you would say:

{{ line_item.variant.next_incoming_date | date: "%a, %b %d, %y" }}
1 Like

Thanks for the code.

I have tried adding it in various location on the order confirmation email template, but no joy.

I also wanted to add it to the cart page, next to or beneath, the product title, and again it won’t pull the date in.

Can you paste your order confirmation template code here? I can put it in the correct spot for you.

Also your cart.template code and I can help.

1 Like

This is the section of code from CART…

The stars *** are where I think it should go / where I would like it to go.

{% comment %}
Loop through products in the cart
{% endcomment %}
{% for item in cart.items %}

{{ item.product.title }}

{% unless item.variant.title contains ā€˜Default’ %}

{{ item.variant.title }}

{% endunless %}

{% if settings.product_vendor_enable %}

{{ item.vendor }}

{% endif %}

{% assign property_size = item.properties | size %}
{% if property_size > 0 %}
{% for p in item.properties %}
{% assign first_character_in_key = p.first | truncate: 1, ā€˜ā€™ %}
{% unless p.last == blank or first_character_in_key == ā€˜_’ %}
{{ p.first }}:

{% if p.last contains ā€˜/uploads/’ %}
{{ p.last | split: ā€˜/’ | last }}
{% else %}
{{ p.last }}
{% endif %}


{% endunless %} {% endfor %} {% endif %}

{{ 'cart.general.remove' | t }}

This is the code from the Order Confirmation Email Template…

Again, I’ve marked where I would like the incoming transfer date to be displayed, I think!

Thank you for help and any suggestions would be appreciated.

Also, just to note, the code I use on our product page is, which works perfectly is:

{{ product.variants.first.next_incoming_date | date: ā€œ%d-%m-%Yā€ }}

{% for line in subtotal_line_items %} {% endfor %}
{% if line.image %} {% endif %} {% if line.product.title %} {% assign line_title = line.product.title %}

{% else %}
{% assign line_title = line.title %}
{% endif %}

{% if line.quantity < line.quantity %}
{% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
{% else %}
{% assign line_display = line.quantity %}
{% endif %}


{{ line_title }} Ɨ {{ line_display }}

{% if line.variant.title != ā€˜Default Title’ %}
{{ line.variant.title }}

{% endif %}

{% if line.refunded_quantity > 0 %}
Refunded
{% endif %}

{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != ā€˜all’ %}



{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})


{% endif %}
{% endfor %}
{% endif %}

{% if line.original_line_price != line.final_line_price %} {{ line.original_line_price | money }} {% endif %}

{% if line.final_line_price > 0 %} {{ line.final_line_price | money }} {% else %} Free {% endif %}

in your cart template where you have the *** put

{{ item.variant.next_incoming_date | date: "%a, %b %d, %y" }}

in your order confirmation template use:

{{ line.variant.next_incoming_date | date: "%a, %b %d, %y" }}
1 Like

Thank you! These are added and working.

I’ll keep an eye on it and see how it goes. I might make some tweeks, for example add the word ā€˜availability date’ or ā€˜pre-order’ next to it, but obviously if a product is in stock I don’t want to see these words. But that’s for another day!

This definitely gives us extra back up that a customer has seen a date, as we had an issue the other day where a customer was adamant that the page didn’t have pre-order info on and I think they were visiting a cached page from before we had changed the page template to our pre-order one, which displays a date. So if the dates are displayed in the cart and email confirmation this will help greatly.

The only other thing I have to do now is I also want this date to appear in the Cart Drawer… as you can actually proceed through to checkout.

I tried adding {{ item.variant.next_incoming_date | date: ā€œ%d-%m-%Yā€ }} as I did to the Cart page but then the Drawer does not load up.

Appreciate you help - thanks!

Adding dynamic messaging to a cart drawer (coded in AJAX) is more complicated than just adding a line of code here or there, and depends on your theme and its code. I can help you do this, but would need to set up a quote and payment for hourly work on that - or you can hire another expert from the Shopify Experts listing. They should be able to do it relatively quickly, but its not something most will instruct you to do on your own for free. :slightly_smiling_face:

1 Like

Not to hijack thread, but is something similar possible on a sold out item’s product page? We use transfers to manage incoming inventory, we have multiple vendors, just one location to be delivered. Some times things sell out, and it would be nice to display on product page the eta of the product if it’s listed in an incoming transfer. I use Minimal Theme. Thanks.

Yes you can display the transfer date on the product page - how to do it and how complicated depends on if the date changes depending on the variant or if it is the same for all variants of the product (example, shirt comes in S, M, L - only small is on backorder and transfer date should only show when customer has that variant selected)

If your products dont have variants or the dates are the same for all of them, then its easy like this:

{% if product.selected_variant.incoming %}
  Expected to ship: {{ product.selected_variant.next_incoming_date | date: "%a, %b %d, %y"}}
{% endif %}
1 Like

Wow, thanks so much!

  1. Do you accept tips/payment for your help, or is that wrong of me to ask?

  2. I do have a lot of 2 variant products, and just a handful that have 3 or more. While some products just have 1 variant. Would you have a recommendation? I use the Minimal Theme. I have Single Variant and Multiple Variant products on this page - https://paintedheirloom.com/collections/iron-orchid-designs-stamps

  3. Side note, I will often have the same product on 2 or more incoming transfers. I haven’t tried your code, yet, as I’m hoping to have it work with variants. Will it pull in the earliest expected arrival date of multiple transfers? Example, I’m sold out of Product A, it’s on a transfer expected 08/30/2021, and another expected 09/06/2021. Of course I’d want it to display 8/30/2021 until that transfer is received.

  4. Finally, with the above in mind, is it possible to ā€œwedgeā€ in the expected incoming date on my sold out circle to say, ā€œETA in stock 9/30/2021ā€ in place of the ā€œBack in stock soon!ā€ - of course, the date being pulled from the earliest expected arrival date from the transfer.

Truly, thanks so much for your time.

Hi @Vonda_Youngkin these customizations are certainly possible, but require more in-depth changes to your code and work than I would do for free on the forums. If you would like to email me I can get those changes done for you in a few hours. My email is mail@handhugs.com.

1 Like

Hi,

I’m trying to add the incoming transfer date to my order confirmation template but it doesn’t seem to work. My template is a customised version and I’ve tried placing the code in some areas but it simply isn’t coming through. Would really appreciate some help. Thanks.


                                      
                                      
                                        {% if line_items != blank %}
                                          
                                          {% assign hidden_variant_ids = "" %}
                                          {% for line_item in line_items %}
                                            {% if line_item.properties._boldVariantIds %}
                                              {% assign hidden_variant_ids = hidden_variant_ids | append: ',' %}
                                              {% assign hidden_variant_ids = hidden_variant_ids | append: line_item.properties._boldVariantIds %}
                                            {% endif %}
                                          {% endfor %}
                                          
                                          
                                            <table>

                                              
                                                
                                                  
                                                    {% for line_item in line_items %}
                                                      {% if line_item.quantity != 0 %}
                                                        
                                                        {% capture line_variant_id1 %}{{ line_item.variant_id }}{% endcapture %}
                                                        {% assign adjusted_item_price = line_item.price %}
                                                        {% assign adjusted_line_price = line_item.final_line_price %}
                                                        {% unless line_variant_id1 == blank %}
                                                          {% if hidden_variant_ids contains line_variant_id1 %}{% continue %}{% endif %}
                                                          {% for line_item2 in line_items %}
                                                            {% capture line_variant_id2 %}{{ line_item2.variant_id }}{% endcapture %}
                                                            {% if line_item.properties._boldVariantIds contains line_variant_id2 %}
                                                              {% assign adjusted_item_price = adjusted_item_price | plus: line_item2.price %}
                                                              {% assign adjusted_line_option_price = line_item2.price | times: line_item.quantity %}
                                                              {% assign adjusted_line_price = adjusted_line_price | plus: adjusted_line_option_price %}
                                                            {% endif %}
                                                          {% endfor %}
                                                        {% endunless %}
                                                        
                                                        {% unless forloop.last %}
                                                          
                                                        {% endunless %}
                                                      {% endif %}
                                                    {% endfor %}
                                                  <table>

                                                    <tr>

                                                      <th colspan="2">

                                                        ### Items ordered
                                                      

</th>

                                                    </tr>

                                                        
                                                          <th>

{% if line_item.image != blank %}{% endif %}

</th>

                                                          
                                                            
                                                                {% if line_item.product != blank and line_item.product.title != blank %}
                                                                  {% assign line_title = line_item.product.title %}
                                                                {% else %}
                                                                  {% assign line_title = line_item.title %}
                                                                {% endif %}
                                                                <table>

                                                              <tr>
<th>

                                                                  

                                                                    
                                                                      {{ line_title }}
                                                                    
                                                                    {% if line_item.variant.title != blank and line_item.variant.title != "Default Title" %}
                                                                      

                                                                      {{ line_item.variant.title }}
                                                                    {% endif %}
                                                                    {% for p in line_item.properties %}
                                                                      {% assign p_internal = p.first | slice: 0 %}
                                                                      {% unless p.first contains "builder_id" or p.first contains "builder_info" or p.first contains "master_builder" or p.last == "" or p.last == blank %}
                                                                        {% if p.first contains "preview" or p.last contains "/uploads/" or p.last contains "//uploadery.s3" %}
                                                                          

                                                                          {{ p.first }}:

                                                                          
                                                                          
                                                                        {% elsif p_internal != "_" %}
                                                                          

                                                                          {{ p.first }}: {{ p.last }}
                                                                        {% endif %}
                                                                      {% endunless %}
                                                                    {% endfor %}
                                                                    {% if line_item.variant.unit_price_measurement != blank %}
                                                                      

                                                                      ({{ line_item.variant.unit_price | money }}{% if line_item.variant.unit_price_measurement.reference_value != 1 %} {{ line_item.variant.unit_price_measurement.reference_value }}{% endif %}/{{ line_item.variant.unit_price_measurement.reference_unit | capitalize }})
                                                                    {% endif %}
                                                                  

                                                                

</th>

                                                                <th>

                                                                  

x {{ line_item.quantity }}

                                                                

</th>

                                                                <th>

                                                                  

                                                                    {{ adjusted_line_price | money }}
                                                                  

                                                                

</th>

                                                              </tr>

                                                            </table>
                                                          
                                                        
                                                            
                                                          </table>
                                                
                                              
                                              
                                                
                                                  
                                                    {% assign displayable_discounts = false %}
                                                    {% for discount in discounts %}{% if discount.code != blank %}{% assign displayable_discounts = true %}{% break %}{% endif %}{% endfor %}
                                                    {% if discounts_amount != blank %}
                                                      {% if discounts_amount != 0.0 or displayable_discounts == true  %}
                                                        
                                                      {% endif %}
                                                    {% endif %}
                                                    
                                                    {% if shipping_method.title != blank && shipping_method.price != 0.00 %}
                                                      
                                                    {% endif %}
                                                    {% if current_total_duties and current_total_duties != 0.00 %}
                                                      
                                                    {% endif %}
                                                    {% if tax_price != 0.00 and tax_price != blank %}
                                                      
                                                    {% endif %}
                                                    {% if total_tip and total_tip != 0.00 %}
                                                      
                                                    {% endif %}
                                                    
                                                    {% assign total_paid = 0.00 %}
                                                    {% assign total_refunds = 0.00 %}
                                                    {% for transaction in transactions %}
                                                      {% assign kind = transaction.kind %}
                                                      {% assign status = transaction.status %}
                                                      {% if status == "success" %}
                                                        {% if kind == "sale" or kind == "capture" %}
                                                          {% assign total_paid = total_paid | plus: transaction.amount %}
                                                        {% elsif kind == 'change' %}
                                                          {% assign total_paid = total_paid | minus: transaction.amount %}
                                                        {% elsif kind == 'refund' %}
                                                          {% assign total_refunds = total_refunds | plus: transaction.amount %}
                                                          {% assign total_paid = total_paid | minus: transaction.amount %}
                                                        {% endif %}
                                                      {% endif %}
                                                    {% endfor %}
                                                    {% assign total_outstanding = total_price | minus: total_paid | minus: total_refunds %}
                                                    {% if total_refunds != 0.00 %}
                                                      
                                                    {% endif %}
                                                  <table>
<tr>

                                                          <th>

                                                            Discount{% for discount in discounts %}{% if discount.code != blank and discount.code != 'Discount'%} ({{ discount.code }}){% endif %}{% endfor %}

</th>

                                                          <th>

-{{ discounts_amount | default: 0 | money }}

</th>

                                                        </tr>
<tr>

                                                      <th>

Subtotal

</th>

                                                      <th>

{{ subtotal_price | money }}

</th>

                                                    </tr>
<tr>

                                                        <th>

{{ shipping_method.title }}

</th>

                                                        <th>

{{ shipping_method.price | money }}

</th>

                                                      </tr>
<tr>

                                                        <th>

Import duties

</th>

                                                        <th>

                                                          {{ current_total_duties | money }}

</th>

                                                      </tr>
<tr>

                                                        <th>

GST

</th>

                                                        <th>

                                                          {{ tax_price | money }}

</th>

                                                      </tr>
<tr>

                                                        <th>

Tip

</th>

                                                        <th>

                                                          {{ total_tip | money }}

</th>

                                                      </tr>
<tr>

                                                      <th>

Total

</th>

                                                      <th>

{{ total_price | money }}

</th>

                                                    </tr>
<tr>

                                                        <th>

Refund

</th>

                                                        <th>

-{{ total_refunds | money }}

</th>

                                                      </tr>
</table>
                                                
                                              
                                            </table>
                                          
                                        {% endif %}
                                      
                                      

I used this for my template in my previous post, seems to work. Would like to know if it needs to be tweaked. Thanks

{% if line_item.variant.next_incoming_date != blank %}
                                                                      

                                                                      {{ "Pre-order ETA: " }}{{ line_item.variant.next_incoming_date | date: "%a, %b %d, %Y" }}
{% endif %}