Forum

Thread tagged as: Question, Shop

Display Order Details - Cart Property in Historical Order

Hi!!

I'd like to display a particular cart property `id=gift_message' in my historical order detail page.

I see that the property has been recorded as a part of the order----appearing above "status" in the "Additional Information" section of my Perch Orders.

Is there a page function I should use here?

Unsuccessfully, I've tried adding <perch:shop id="gift_message" /> to my template that returns other order details via

perch_shop_order($order_id);
Olympia Kyriakides

Olympia Kyriakides 1 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you see it with <perch:showall /> ?

When you had me use PerchUtil::debug($order) in another thread, I noticed that my cart property IDs were not exactly the same as the ones I had set.

In a pre-checkout cart form I was doing this to collect a gift message:

<perch:input type="textarea" id="gift_message" editor="markitup" markdown="true" cart-property="gift_message" />

But $order knew id="_gift_message"

so this worked:

<perch:shop id="_gift_message" />

with

$order_id =    perch_get('orderID', ['skip-template' => true,]);

perch_shop_order($order_id, ['template' => 'shop/orders/order_details_gift.html',]);

All seems good. Thank you Drew.