Forum

Thread tagged as: Question, Shop

Order Confirmation Template

Hi,

I am using the following to display order details on a success page:

$order_id = perch_shop_successful_order_id();
perch_shop_order($order_id, [
  'template' => 'trade_order_success.html'
]);

I have put the custom template in perch/templates/shop/orders, but it is not being found. Debug message is:

Template file not found: /Volumes/Data/g Websites/New Development/Newgate/CLOCKS FINAL 1/admin/addons/apps/perch_shop/templates/trade_order_success.html

When I don't specify a template it is usingperch/templates/shop/orders/order.html as I would expect.

Where do I need to put this template for it to work, or do I need to change the specified path in perch_shop_order?

Thanks

Mike

Mike Harrison

Mike Harrison 37 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What happens if you specify the path orders/trade_order_success ?

No joy - debug shows:

Template file not found: /Volumes/Data/g Websites/New Development/Newgate/CLOCKS FINAL 1/admin/addons/apps/perch_shop/templates/orders/trade_order_success.html
Drew McLellan

Drew McLellan 2638 points
Perch Support

Curious.

shop/orders/trade_order_success

?

That's done the trick thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

Huh. I'll see what's going on with it.