Trouble migrating to Shopify Order Printer

Topic summary

Migration to the Shopify Order Printer app surfaced a syntax error in a Liquid template line using an unless condition with the logical operator “&&”. The issue: Shopify Liquid does not support “&&”; the correct logical operator is “and”. Action taken: replace “&&” with “and” in the condition that checks whether price_index and bold_var_ids are empty strings. Outcome: the error was eliminated and the template saved successfully. Context: the migration guide did not mention this, and the user is not a developer. Status: resolved with no further changes or disagreements. Note: Liquid is Shopify’s templating language; “unless” executes its block only if the condition is false, so correct logical operators are essential for valid syntax.

Summarized with AI on December 27. AI used: gpt-5.

Hi!

I’m having trouble with a particular line of code when trying to migrate to the new Shopify Order Printer app. The code from the template is this:

{% unless price_index == "" && bold_var_ids == "" %}

I get a warning about this particular line having a syntax error. I can’t find anything about any of this in the migration guide. Though, I’m not a developer, and I could easily be doing something wrong.

I would appreciate any assistance anyone can give me!

1 Like

There is no “&&” in Shopify Liquid, you might want to switch that into “and” then try again saving.

That eliminated the error. Thank you!

You’re welcome!