Forum
Show Shop orders and order items on one page
Hi,
in Perch Shop it is possible to show all orders for the customer by using «perch_shop_orders()». By clicking on a link you can get to the detail page with «perch_shop_order()». I wonder if it’s possible to combine both on one page, e.g.:
Order #1, some text: - Item 1 - Item 2 - ...
Order #2, some text: - Item 1 - Item 2 - ...
Has any one an idea if this is possible using Perch Shop?
Thanks René
Hello Rene,
Yes, it is possible. It is basically the same as this: https://docs.grabaperch.com/perch/content/functions/how-do-i-create-list-detail-pages/
Hi Hussein,
thanks for your suggestion.
Actually it’s not what I was looking for as the Customer still have to click on a link to get the order details. I was looking for a combined solution where the customer can see all order items for all orders without choosing an order and getting to a detail page/template (e.g. like on amazon: https://www.ferienspass-ludwigsburg.de/perch/resources/orders.png).
Ok, so you want to add the order details in the list?
You can use an each callback to add the order details. The following calls
perch_shop_order()
for each item on the list:And in your listing template:
Hi Hussein,
thanks for your reply. I will test it the next days.
René
Edit:
Hi Hussein, I just tested it and it was exactly what I was looking for :)
Thanks for your help
René