Forum
Adding template to perch_shop_order
Hi
I'm trying to add 'template' => 'my-template.html’
to;
<?php perch_shop_order(perch_get('orderID')); ?>
Looking at the docs, I thought;
<?php perch_shop_order($order_id, [
'template' => 'orders/items.html'
]); ?>
would work, but in debug it doesn't show that the template is either being used or missing? Is it down to the way I'm getting the ID (orderID v $order_id)?
Hi Wayne
This should work. Is there no path at all shown in your debug? This function defaults to the template at /shop/orders/order.html.
If you're taking the order ID from the URL then
Does the same as
Jon
Thanks Jon
Your example made me realise I was missing shop/ from my path to the template.
Regards Wayne
You're welcome!