예제 #1
0
		public function getCheckoutAddressPreview(ISC_QUOTE_ADDRESS $address)
		{
			$addressPieces = array(
				$address->getFirstName().' '.$address->getLastName(),
				$address->getCompany(),
				$address->getAddress1(),
				$address->getAddress2(),
				$address->getCity(),
				$address->getStateName(),
				$address->getCountryName(),
				$address->getZip()
			);
			foreach($addressPieces as $k => $piece) {
				if(!trim($piece)) {
					unset($addressPieces[$k]);
				}
			}

			$addressString = implode(', ', $addressPieces);
			if(isc_strlen($addressString) > 60) {
				$addressString = substr($addressString, 0, 57).'...';
			}

			return $addressString;
		}