How can I customize Liquid for invoice numbering on each order fulfillment?

Hi,

I´m trying to costumize the invoices we are using; they use Liquid.

We want our invoices to have a specific format yymmdd 00, where the 00 increases by 1 every time we fulfill an order for that day. So, if today we would have had 2 orders fulfilled then the invocies resulting would be:

220314 01

220314 02.

I tried setting up a counter but it only shows 0 every time:

{% assign count = 00 %}
{% for fulfillments in “today” %}
{% assign count = count | plus 1 %}
{% endfor %}

I also tried:

{% assign count = 00 %}
{% for fulfillments in “today” %}

{% if fulfillment_status = "Fulfilled%}
{% assign count = count | plus 1 %}

{% endif %}

{% endfor %}

It also did not work.

Any suggestions on how this can be achieved?

Thank you in advance!

Hi @Boltenstern ,

What page are you trying to display this on? Please describe it more, I will help you show it.

Because I checked and your current code is incorrect, so it definitely won’t show.

Hope it helps!