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
Hi Steven and @paul127
I was wondering if either of you had been able to get the result you are after? I'm wanting to do the same thing with the latest Order Printer App that has been released.
Have you been trying to get this to work with the new app or the legacy app?
Thanks
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024