All things Shopify and commerce
Hi,
We are using the Order Printer app for our invoices and packing notes. I changed the layout etc and a few other things, but that's as far as my coding skills go.
Our issue is that when we have refunded for an item, it still shows on the invoice. We thought we could live with it, but today I was playing around with a particular invoice, where we'd done a refund for one item, and then customer wanted to add an item, then changed their mind, so I removed the item. We don't want the invoice displaying products we've added and then removed. So along with the refunded product the invoice now looks a complete mess!
Is there any code that I could perhaps state, only display items with quantity more than 1? This would resolve the issue with the refunded items and anything removed.
Any help would be greatly appreciated!
Hannah
Solved! Go to the solution
This is an accepted solution.
Had the same issue. I solved it by:
adding " {% if line_item.quantity > 0 %} " after " {% for line_item in line_items %}"
and adding "{% endif %}" after "{% endfor %}"
. All without the quotes.
This is an accepted solution.
Thank you nichinu,
That's what I was going to do, but your post confirmed it.
I added it a little differently and it seems to be removing the items with zero (0) quantities properly from the invoice. Here is what my code for the entire table looks like:
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>Quantity</th>
<th>Item</th>
<th>Price</th>
</tr>
</thead>
<tbody>
{% for line_item in line_items %}
{% if line_item.quantity > 0 %}
<tr>
<td>{{ line_item.quantity }} x</td>
<td>{{ line_item.title }}</td>
<td>{{ line_item.line_price | money }}</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
Best regards.
Same issue here. All invoices are messed up. All shopify stores have this issue its not just us. Whenever a product is removed the storefront account page and the invoices keep the product in there. It is simply astonishing that such a simple use case has not been addressed. I read somewhere that only if you do some custom implementation with webhooks you can achieve this but no clue.
Hi. In my case, to print invoices without the removed items I changed this line:
{% for line_item in line_items %}
to this:
{% for line_item in fulfilled_line_items %}
Just make sure to print the invoice after fulfillment. Hope this helps
This is an accepted solution.
Had the same issue. I solved it by:
adding " {% if line_item.quantity > 0 %} " after " {% for line_item in line_items %}"
and adding "{% endif %}" after "{% endfor %}"
. All without the quotes.
This is an accepted solution.
Thank you nichinu,
That's what I was going to do, but your post confirmed it.
I added it a little differently and it seems to be removing the items with zero (0) quantities properly from the invoice. Here is what my code for the entire table looks like:
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>Quantity</th>
<th>Item</th>
<th>Price</th>
</tr>
</thead>
<tbody>
{% for line_item in line_items %}
{% if line_item.quantity > 0 %}
<tr>
<td>{{ line_item.quantity }} x</td>
<td>{{ line_item.title }}</td>
<td>{{ line_item.line_price | money }}</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
Best regards.
Perfect - thank you!
Apart from it would only work with {% endif %} before {% endfor %}.
As CalvinOU812 has shown above.
Hi am new . I don't know where to add this code. Can you please help us.
Where I have to update this code can you please update us ?
Hello,
1) You need to install the free Shopify "Order Printer" app. Search for "Order Printer" in the Shopify App Store.
2) After it's installed, in Shopify, go to Apps and click on the Order Printer app.
3) Click "Message templates".
4) In the Invoice Template row, click "Duplicate Template". Leave the original for future reference.
5) Edit the duplicated invoice.
Experiment and have fun.
Vou deixar uma dica!
Algumas empresas podem resolver este problema com o serviço de Outsourcing de Impressão, essas empresas costumam ter técnicos que ajudam nas configurações.
Saiba mais sobre locação de impressoras acessando o link abaixo!
Three years later and its the same issue.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024