Hey,
Shopify’s new order printer is such a disappointment to me. Why fix something that isn’t broken and replace it with something offering no added value?
This code worked beautifully earlier, now it makes the New Order Printer crash; Syntax not valid on line XX.
This is the line: {% if SKUlist | uniq | size == 1 %}
And here’s the full code:
Order date {{ order.created_at | date: “%d.%m.%y” }}
Packing slip for order {{ order.order_name }}
Notes: {{ order.note }}
{% if order.shipping_address %}
Shipping Address
{% endif %} {{ order.shipping_address.name }}
{{ order.shipping_address.street }}
{{ order.shipping_address.province_code }} {{ order.shipping_address.zip | upcase }} {{ order.shipping_address.city }}
{{ order.shipping_address.country }}
Shipment Detail
{%- comment -%} Removed by Adam B ( Shopify Theme Support) May 24 2023 {%- endcomment -%} {% assign totalProductsOrdered = 0 %} {% assign totalProductsFulfilled = 0 %} {% assign sizeUnfulfilled = order.unfulfilled_line_items | size%} {% assign sizeFulfilled = order.fulfilled_line_items | size%}{% if sizeFulfilled != 0 and sizeUnfulfilled != 0%}
{% endif %}{% if sizeFulfilled != 0 %}
{% for line_item in fulfilled_line_items %}
{% if line_item.quantity != 0 %}
{% assign SKUlist = SKUs | strip %}
{% assign fulfilled_qty = line_item.quantity | minus: line_item.fulfillable_quantity %}
{% if SKUlist | uniq | size == 1 %}
{% assign length = SKUs | size %}
{% for i in (1..length) %}
{% assign totalProductsFulfilled = totalProductsFulfilled | plus: fulfilled_qty %}
{% assign totalProductsOrdered = totalProductsOrdered | plus: fulfilled_qty %}
{% endfor %}
{%- comment -%}Removed by Adam B ( Shopify Theme Support) May 24 2023
{% else %}
{% assign optionNumber = 1 %}
{% if sizeUnfulfilled != 0 and sizeFulfilled != 0 %}
{% endif %}{% if sizeUnfulfilled != 0 %}
{% for line_item in unfulfilled_line_items %}
{% if line_item.quantity != 0 %}
{% assign SKUlist = SKUs | strip %}
{% if SKUlist | uniq | size == 1 %}
{% assign length = SKUs | size %}
{% for i in (1..length) %}
{% comment %} Hidden by Sarah S. @ Shopify Theme Support | February 8 2023
{{ line_item.variant.option1 }}
{% endcomment %}
{% assign totalProductsOrdered = totalProductsOrdered | plus: line_item.fulfillable_quantity %}
{% endfor %}
{%- comment -%}Removed by Adam B ( Shopify Theme Support) May 24 2023
| Image | SKU | Size | Quantity | Item | |||||
|---|---|---|---|---|---|---|---|---|---|
| Fulfilled: | |||||||||
| {{ line_item.image | img_url: 'thumb' | img_tag }} |
{% assign SKUs = line_item.sku | split: '&' %}
{% for sku in SKUs %}
{{ sku }} {% endfor %} |
{% comment %} Edit by Sarah S. @ Shopify Theme Support | February 6 2023 {% endcomment %} |
{% for i in (1..length) %} |
{% comment %} Hidden by Sarah S. @ Shopify Theme Support | February 8 2023
{% for option in line_item.product.options %}
{% assign totalProductsOrdered = totalProductsOrdered | plus: fulfilled_qty %}
{% assign totalProductsFulfilled = totalProductsFulfilled | plus: fulfilled_qty %}
{% if optionNumber == 1 %} {% endfor %} {% comment %} Hidden by Sarah S. @ Shopify Theme Support | February 8 2023 |
{% for option in line_item.product.options %}
{{ fulfilled_qty }} {% endfor %} | {{ line_item.product_title }} | |||
| Unfulfilled: {{test}} | |||||||||
| {{ line_item.image | img_url: 'thumb' | img_tag }} |
{% assign SKUs = line_item.sku | split: '&' %}
{% for sku in SKUs %}
{{ sku }} {% endfor %} |
{% comment %} Hidden by Sarah S. @ Shopify Theme Support | February 8 2023 {% comment %} Edit by Sarah S. @ Shopify Theme Support | February 6 2023 {% endcomment %} |
{% for i in (1..length) %} |
{% for option in line_item.product.options %}
{% assign totalProductsOrdered = totalProductsOrdered | plus: line_item.fulfillable_quantity %}
{% if optionNumber == 1 %} {% assign optionNumber = optionNumber | plus: 1 %} {% comment %} Hidden by Sarah S. @ Shopify Theme Support | February 8 2023 |
{% for option in line_item.product.options %}
{{ line_item.fulfillable_quantity }} {% endfor %} | {{ line_item.product_title }} | |||
| Total items: {{ totalProductsOrdered }} | Total items: {{totalProductsFulfilled}} of {{ totalProductsOrdered }} | ||||||||
{{ shop.name }}
by sCHNOw Sàrl
{{ shop.address.address1 }}
{{ shop.address.province_code }} {{ shop.address.zip | upcase }} {{ shop.address.city }}
{{ shop.address.country }}
If you have a question, mail us at {{ shop.email }}
Thank you in advance for any help. Shopify chat is as usual useless.
Paal