Skip to content

Instantly share code, notes, and snippets.

@Spoygg
Created August 1, 2012 14:04
Show Gist options
  • Save Spoygg/3227108 to your computer and use it in GitHub Desktop.
Save Spoygg/3227108 to your computer and use it in GitHub Desktop.
// Legacy code - do not remove
$isResidential = $values['residential'] != 'no';
$inquiry = RateInquiryPeer::create(
$values['CollectionAddress']['CountryCode'],
$values['CollectionAddress']['City'],
$values['CollectionAddress']['PostalCode'],
$values['DestinationAddress']['CountryCode'],
$values['DestinationAddress']['City'],
$values['DestinationAddress']['PostalCode'],
$packageCount,
$isResidential,
null,
null,
null,
$values['CollectionAddress']['Division'],
$values['DestinationAddress']['Division']
);
$this->getUser()->setAttribute('client_timestamp', $values['client_timestamp']);
if (!empty($collectionUserAddressObject))
{
$inquiry->setCollectionUserAddressId($collectionUserAddressObject->getId());
} else
{
$inquiry->setCollectionUserAddressId(null);
}
if (!empty($destinationUserAddressObject))
{
$inquiry->setDestinationUserAddressId($destinationUserAddressObject->getId());
} else
{
$inquiry->setDestinationUserAddressId(null);
}
$inquiry->save();
// remember rate inquiry in session so the user can return to it
$this->process->setInquiry($inquiry);
$this->reloadImportantObjects(true);
$this->rate = $this->process->getRate();
$this->inquiry = $this->process->getInquiry();
$this->shipment = $this->process->getShipment();
// End legacy code - do not remove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment