Esempio n. 1
0
echo '$speakcivi->postal_code: ' . $speakcivi->postalCode . "\n\n\n";
$speakcivi->campaignObj = new CRM_Speakcivi_Logic_Campaign();
$speakcivi->campaign = $speakcivi->campaignObj->getCampaign($param->external_id);
$speakcivi->campaign = $speakcivi->campaignObj->setCampaign($param->external_id, $speakcivi->campaign);
if ($speakcivi->campaignObj->isValidCampaign($speakcivi->campaign)) {
    $speakcivi->campaignId = $speakcivi->campaign['id'];
    $speakcivi->campaignObj->customFields = $speakcivi->campaignObj->getCustomFields($speakcivi->campaignId);
    $speakcivi->locale = $speakcivi->campaignObj->getLanguage();
    echo "locale: \n";
    var_dump($speakcivi->locale);
    echo "\n\n";
} else {
    echo 'blad :-[';
    exit;
}
$gender = $speakcivi->getGenderId($param->cons_hash->lastname);
echo $param->cons_hash->lastname . "\n";
echo '$gender: ' . $gender . "\n";
$lastname = $speakcivi->cleanLastname($param->cons_hash->lastname);
echo 'lastname: ' . $lastname . "\n\n";
$result = $speakcivi->createContact($param);
print_r($result);
$genderId = $speakcivi->getGenderId($param->cons_hash->lastname);
$genderShortcut = $speakcivi->getGenderShortcut($param->cons_hash->lastname);
echo "genderId: " . $genderId . "\n";
echo "genderShortcut: " . $genderShortcut . "\n";
var_dump($genderId);
var_dump($genderShortcut);
var_dump($speakcivi->genderFemaleValue);
var_dump($speakcivi->genderMaleValue);
var_dump($speakcivi->genderUnspecifiedValue);