Beispiel #1
0
 /**
  * get gender according to shopgate needs
  *
  * @param Mage_Customer_Model_Customer|Mage_Customer_Model_Address $data
  * @return string
  */
 public function getShopgateCustomerGender($data)
 {
     $options = Mage::getResourceModel('customer/customer')->getAttribute('gender')->getSource()->getAllOptions(false);
     $gender = null;
     foreach ($options as $option) {
         if ($option['value'] == $data->getGender()) {
             $gender = $option['label'];
         }
     }
     switch ($gender) {
         case 'Male':
             return ShopgateCustomer::MALE;
             break;
         case 'Female':
             return ShopgateCustomer::FEMALE;
             break;
         default:
             return '';
     }
 }