Hide prices on your order printer packing slip if the “Is this a gift?” checkbox is checked

If you would like to hide your product prices on your packing slip when the “is this a gift?” checkbox is checked, the best method would be to use Shopify’s Order Printer app with a condition to check this value.

Please note, if the “Gift” property comes through in the additional details section of your order, the regular Shopify packing slip can not detect this condition, so the Order Printer app must be used instead.

In order printer, you may display the items price within the line item loop. In order to hide the price, you can wrap it is a check as follows:

 {% if attributes.gift != blank %}
<p class="text-align-right">
{{ line_item.price }}
</p>
{% endif %}

You can find this condition in a full example using the template below:

{% for line_item in line_items %}
<div class="flex-line-item">
<div class="flex-line-item-img">
{% if line_item.product.featured_image != blank %}
<div class="aspect-ratio aspect-ratio-square" style="width: {{ desired_image_size }}px; height: {{ desired_image_size }}px;">
{{ line_item.product.featured_image | product_img_url: 'thumb' | img_tag }}
</div>
{% endif %}
</div>
<div class="flex-line-item-description">
<p>
<span class="line-item-description-line">
{{ line_item.title }}
</span>
{% if line_item.variant_title != blank %}
<span class="line-item-description-line">
{{ line_item.variant_title }}
</span>
{% endif %}
{% if line_item.sku != blank %}
<span class="line-item-description-line">
{{ line_item.sku }}
</span>
{% endif %}
</p>
</div>
<div class="flex-line-item-quantity">
<p class="text-align-right">
{{ line_item.quantity }}
</p>
</div>
{% if attributes.gift != blank %}
<p class="text-align-right">
{{ line_item.price }}
</p>
{% endif %}
</div>
{% endfor %}

Can't find the answer in our documentation?
Contact Support