Example #1
0
 /**
  * Get region filter
  *
  * @param Mage_Customer_Model_Address $address
  * @param int                         $storeId
  * @return string|bool
  */
 protected function _getFilterRegion($address, $storeId)
 {
     $filter = false;
     $regionFilters = explode(',', Mage::getStoreConfig('tax/avatax/region_filter_list', $storeId));
     $entityId = $address->getRegionId() ?: $address->getCountryId();
     if (!in_array($entityId, $regionFilters)) {
         $filter = 'region';
     }
     return $filter;
 }
Example #2
0
 /**
  * Import quote address data from customer address object
  *
  * @param   Mage_Customer_Model_Address $address
  * @return  Mage_Sales_Model_Quote_Address
  */
 public function importCustomerAddress(Mage_Customer_Model_Address $address)
 {
     $this->setCustomerAddressId($address->getId())->setCustomerId($address->getParentId())->setEmail($address->hasEmail() ? $address->getEmail() : $address->getCustomer()->getEmail())->setFirstname($address->getFirstname())->setLastname($address->getLastname())->setCompany($address->getCompany())->setStreet($address->getStreet())->setCity($address->getCity())->setRegion($address->getRegion())->setRegionId($address->getRegionId())->setPostcode($address->getPostcode())->setCountryId($address->getCountryId())->setTelephone($address->getTelephone())->setFax($address->getFax());
     return $this;
 }