A user wants to display “You’ve just earned a FREE Secret Gift!” text on packing slips when the pre-discount cart value exceeds $350.
Problem: Standard Liquid variables like {{ subtotal_price }} or {{ cart.subtotal_price }} aren’t working in the packing slip template.
Attempted Solutions:
Using {% if order.subtotal_price > 35000 %} - returned no value
Calculating {% if total_price - discounts_savings >= 35000 %} - didn’t work
Manually calculating discount savings by looping through order.discount_allocations - still unsuccessful
Current Status:
The calculation {{ total_price | minus: discounts_savings }} returns correct values when displayed
However, incorporating this into an {% if %} statement to conditionally show the text isn’t functioning
The text either doesn’t appear at all or shows for all orders regardless of value
Key Challenge: Finding the correct Liquid variable or syntax to evaluate pre-discount order value within a conditional statement on the packing slip template. The issue appears to be with the conditional logic rather than the calculation itself.
Summarized with AI on November 16.
AI used: claude-sonnet-4-5-20250929.
I have a question that may be quite simple for the experts.
Basically, I want to make the ‘You’ve just earned a Free Gift!’ text appear on the packing slip for orders whose cart value is greater than $350 before any discount. Basically, as long as the cart value (not the final total value) is more than $350, then the text appears on the packing slip.
I’ve tried to use just one liquid variable such as {{ subtotal_price }} or {{ cart.subtotal.price }} but it didn’t seem to work…So I worked around it by using the total price - discounts as per my example.
Is there anything you can advise for me to be able to make the free gift text appear on the packing slip for the orders whose before-discount value is greater than $350?
Any advice will be greatly appreciated.
{% if total_price | minus: discounts_savings >=35000 %}
<p style="padding-top: 10px;">You've just earned a FREE Secret Gift! </p>
{% endif %}