From: Iain Patterson Date: Thu, 18 Apr 2013 16:11:46 +0000 (-0400) Subject: Suggest parcel from contact details. X-Git-Tag: 2013-04-19~1 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=dedb377e98ae2f222f4d8b5dacc175e4d4e73f4b;p=readifood.git Suggest parcel from contact details. Prepopulate the parcel size and contents field of new orders to a named contact. --- 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);