FROM CACHE - en_header

Add Order Tags and Discount Code in Packing Slip

Solved
Grindie
Tourist
8 0 3

Hello Everyone

I am trying to add some information in the Packing Slip 

 

<div class="wrapper">
  <div class="header">
    <div class="shop-title">
      <p class="to-uppercase">
        {{ shop.name }}
      </p>
    </div>
    <div class="order-title">
      <p class="text-align-right">
        Order {{ order.name }}
      </p>
      <p class="text-align-right">
        {{ order.created_at | date: "%B %e, %Y" }}
      </p>
       <p class="text-align-right">
        Tags: {{ order.tags }}
      </p>
       <p class="text-align-right">
        Discount: {{  }}
      </p>
    </div>
  </div>

 

I try order.tags and it success but it still have some. 

 

Screenshot 2022-03-06 at 9.33.03 PM.png

As I have 2-3 Tags and they don't have any space to recognize them, can any one help me with this?

Any one know the Discount Code variable reference?

Accepted Solution (1)

Accepted Solutions
JoesIdeas
Shopify Expert
1689 146 434

This is an accepted solution.

Maybe you could put them in a list, that might allow them all to show, something like this:

 

<ul>
{% for tag in order.tags %}
<li>{{ tag }}</li>
{% endfor %}
</ul>

 

If you're still not seeing them, try inspecting preview (like in Chrome dev tools) and see if you can see the CSS controlling the element, they may have a default CSS that limits the height of it, and maybe you can override that.

 

• Creator of Order Automator (automation app to save you and your team time on admin tasks)
• Shopify developer for +10 years
• Contributor on the Speed Boostr blog
• Guy who likes to help people

View solution in original post

Replies 4 (4)
JoesIdeas
Shopify Expert
1689 146 434

This is an accepted solution.

Maybe you could put them in a list, that might allow them all to show, something like this:

 

<ul>
{% for tag in order.tags %}
<li>{{ tag }}</li>
{% endfor %}
</ul>

 

If you're still not seeing them, try inspecting preview (like in Chrome dev tools) and see if you can see the CSS controlling the element, they may have a default CSS that limits the height of it, and maybe you can override that.

 

• Creator of Order Automator (automation app to save you and your team time on admin tasks)
• Shopify developer for +10 years
• Contributor on the Speed Boostr blog
• Guy who likes to help people
Grindie
Tourist
8 0 3

Thank you! It Works well!

Do you know the Discount Code variable?

I have try { Discount.code } but it fail.

JoesIdeas
Shopify Expert
1689 146 434

Niiiiice. 👍

 

I think it's {{ order.discount_applications }}

 

Reference: https://shopify.dev/api/liquid/objects/order#order-discount_applications

 

• Creator of Order Automator (automation app to save you and your team time on admin tasks)
• Shopify developer for +10 years
• Contributor on the Speed Boostr blog
• Guy who likes to help people
jessieb_digital
Shopify Partner
1 0 0

{% for discount_application in order.discount_applications %}
{{ discount_application.title  }}
{% endfor %}