Created
August 1, 2012 14:04
-
-
Save Spoygg/3227108 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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