Prepopulate the parcel size and contents field of new orders to a named
contact.
$order->setBeneficiaryId($contact->getId());
echo "<form method=\"POST\" action=\"" . $_SERVER['REQUEST_URI'] . "\">\n";
- echo "<p>Place an order:</p>\n";
+ echo "<p>Placing order for " . $contact->getStrongLink() . ".";
+ $parcel = $contact->getParcel();
+ if ($parcel) {
+ echo " Suggested parcel type is <span class=\"strong\">" . get_contact_parcel_string($contact) . "</span>";
+ $order->setParcel($parcel);
+ }
+ echo "</p>\n";
echo "<table>\n";
show_order_form($order, $area_id);