Forum
Perch Shop Order page
Hi,
I have a question regarding Perch Shop and customers viewing a single order.
I've seen this thread here, that definitely helps:
https://forum.grabaperch.com/forum/08-05-2016-displaying-individual-orders
But what I don't understand is where this code should go. Does it require the creation of an order page and then a sub-page with a specific name?
At the moment the links wrapped around the invoice name in the order list (using perch_shop_orders();) generates something like:
https://www.example.com/orders/39
But we cannot work out where to input code that is displayed on the "39"...
Any help is much appreciated!!
Regards, Alex
Hi Alex
You need to create an orders page and call the order in the url with:
Then create a route for that page with something like:
Hope this helps,
Jon
Hi Jonathan,
Thanks for your reply - I've tried that, and yes, thank you, it definitely routes to the page I've now created.
Only problem is it's throwing an error after using:
It says:
Does that mean anything to you?
Regards, Alex
Hmm. Not sure I'm afraid. You'd need to post your diagnostics.
Are you logged in (as a member) when trying to view the order?
Hi Jonathan,
Yes - I visited the page after clicking a linked wrapped around the order / invoice name generated by:
My diagnostics are:
Does it happen on the current version? You're out of date.
Good point - will update and get back to you!
Okay, all updated but still the same error...:
My code on the page is still:
Diagnostic now:
If you turn on debug, what does it output for the page?
Hi Drew,
I think it's somehow breaking the rendering of anything below it, and that is quite obvious by looking at the code rendered in the browser web inspector. For that reason I cannot output the debug unless I place it above:
If I do place the debug code above it, I get:
Are you able to view Order 39 in the control panel?
Yes - definitely, just went into the perch admin and can see all details for it...
Does it help to see the debug showing up underneath in there? It's:
Do all the products in the order still exist?
Thanks Drew,
You're right - the orders in there were for products that had been since removed.
I made a fresh order on a current product and that showed up no problem.
Out of curiosity, and to retain an order history for customers logging in, is it better to deactivate products than delete them?
Thanks for your help, Alex
How did you delete the product?