App reviews, troubleshooting, and recommendations
When using Order Printer, there's a "print date" displayed in the corner. How can I add an "order date" to the same area? I tried using this:
Order Date {{ order.created_at | date: "%m/%d/%y" }}<br />
But that only displays the words "Order Date" and doesn't show the date the order was created.
Solved! Go to the solution
This is an accepted solution.
Apologies. I've been so focused on that new disaster of an app that I just assumed you were talking about the new version. This is the code I was using for order date in my legacy template: "{{ date | date: "%m/%d/%Y" }}"
Odd. {{ order.created_at | date: "%m/%d/%y" }} seems to be working fine for me. Although I will mention that I actually thought this wasn't working at first because I was testing it on orders that were placed today - I realized it was working properly when I tested it on an order placed in the past. Is it possible you've made the same mistake I did?
If it's still not working, perhaps posting your entire template code would help to diagnose the issue.
I've heavily modified my default template, so I won't post the whole thing, but this is the block that contains the order date:
<li>
<span>Order Date</span>
<span>{{ order.created_at | date: "%m/%d/%Y" }}</span>
</li>
Thank you for the response! I tried to save a previous order as a PDF and the order date doesn't appear:
Here is my code:
<p style="float: right; text-align: right; margin: 0;">
Print Date {{ "now" | date: "%m/%d/%y" }}<br />
Invoice for {{ order_name }}<br />
Order Date {{ order.created_at | date: "%m/%d/%y" }}<br />
</p>
Well that's certainly odd. I know I'm not completely insane at least because I'm using the code snipped I posted earlier in our own order printer template and it seems to be working fine for us:
I have noticed that the new order printer app seems to really dislike float styling. Perhaps try deleting the "float: right;" styling from your <p> container and see if that changes anything?
I haven't switched to the new order printer yet; this is all happening with the Legacy printer.
This is an accepted solution.
Apologies. I've been so focused on that new disaster of an app that I just assumed you were talking about the new version. This is the code I was using for order date in my legacy template: "{{ date | date: "%m/%d/%Y" }}"
That worked!!! Thank you VERY much for supplying that code!!
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024