From dedb377e98ae2f222f4d8b5dacc175e4d4e73f4b Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Thu, 18 Apr 2013 12:11:46 -0400 Subject: [PATCH] Suggest parcel from contact details. Prepopulate the parcel size and contents field of new orders to a named contact. --- lib/order.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/order.php b/lib/order.php index 426606b..928ca67 100644 --- a/lib/order.php +++ b/lib/order.php @@ -385,7 +385,13 @@ $order->setBeneficiaryId($contact->getId()); echo "
\n"; - echo "

Place an order:

\n"; + echo "

Placing order for " . $contact->getStrongLink() . "."; + $parcel = $contact->getParcel(); + if ($parcel) { + echo " Suggested parcel type is " . get_contact_parcel_string($contact) . ""; + $order->setParcel($parcel); + } + echo "

\n"; echo "\n"; show_order_form($order, $area_id); -- 2.7.4