All things Shopify and commerce
We have added Bin Locations to our Invoice/Pick sheet via a variant meta field and would like to sort the line items by the Bin.
Using code from another post, I was able to sort by the Line Item Product title (blue bold). But I have exhausted every permutation I can think of to insert the custom meta field (bold green) into the code. Any suggestions or help?
{% assign lineitems = unfulfilled_line_items | sort: "title" %}
{% for line_item in lineitems %}
{% if line_item.fulfillable_quantity > 0 %}
<tr>
<td><b>{{ line_item.variant.metafields.bin.value }}</b></td>
<td><center>{{ line_item.quantity }}</center></td>
<td>{{ line_item.sku }}</td>
<td><b>{{ line_item.title }}</b><br>
<br> </td>
</tr>
{% else %}
{% endif %}
{% endfor %}
Hi Paul,
I have the same issue and have a developer try many things to get this to work. It seems that it is not possible and Shopify support have confirmed this. The solution from Shopify support is to create your own app where the order can be exported and sorted by your app and re-imported into order printer. I did not try this.
At the moment , we are trying to add alphabet letters to our location Numbers and add it to the tiltle and sort that way. Still experimenting with this. Also Numbers stored as a string will sort completely differently than if they were stored as an Integar as far as I know.
If this last experiment fails, we are going to create a simple Desktop app that will get the orders via the api and sort the way we want and then print to a printer.
Steven
User | RANK |
---|---|
42 | |
42 | |
32 | |
24 | |
21 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023