<?php // Connect to Infusionsoft require_once("isdk.php"); $app = new iSDK; if ($app->cfgCon("connectionName")) { // Current date in Infusionsoft-friendly format $currentDate = date_format(date_create(), 'YmdTH:i:s'); echo "You connected at $currentDate <br/><br/>"; // $fname = 'Dritte'; // $lname = 'Dawg'; // $email = 'dritte@kimsnider.com'; // Assign POST variables using ternary operators and IF statement if ($_POST['Id']) { $conID = $_POST['Id']; } else { $conID = ($_POST['contactId']) ? $_POST['contactId'] : ''; } $eventDate = ($_POST['eventDate']) ? $_POST['eventDate'] : ''; $tagDate = date_format($eventDate, 'Ymd'); // 20131220 Event Registered // Dump to file $file=fopen("kim_log.txt","a+"); fwrite($file, "n $currentDate n"); fwrite($file, "Id: $conID n"); fwrite($file, "Event Date: $eventDate n"); fwrite($file, print_r($_POST,true)); $file=fclose($file); // Find the ID of the Event Registered tag for this date $returnFields = array('Id'); $query = array('GroupCategoryId' => 31, 'GroupName' => $tagDate.'%'); $return = $app->dsQuery("ContactGroup",1,0,$query,$returnFields); // If a matching tag doesn't exist already ... if(!isset($return[0]['Id'])) { //Create the tag $tagText = ' API Mastermind'; $tag = array('GroupName' => $tagDate.$tagText, 'GroupCategoryId' => 31); $theTag = $app->dsAdd('ContactGroup', $tag); // If it does exist ... } else { // Grab that tag's ID so we can use it $theTag = $return[0]['Id']; } // Whether we found it or created it, now we set it $set = $app->grpAssign($contactId, $theTag); } else { echo "Not Connected..."; }
How To Add A Contact Note
$app->dsAdd( 'ContactAction', array( 'ContactId' => $referral, 'UserID' => 1, 'ActionType' => 'Other', 'ActionDescription' => 'Owner Assignment', 'CreationNotes' => "The referred user #{$referral} has been processed/tagged for appropriate ownership.", 'CompletionDate' => $api->infuDate(date('YmdTH:i:s', time())) ) );
How To Add A (Custom) Field To An Order Form
<br /><br /><STRONG>*IMPORTANT - This information is necessary to personalize your package</STRONG><br /><br><br /><div id="productInformation"><br /><%%KEEPWHITESPACE%%> <div id="productInformation"><br /><%%KEEPWHITESPACE%%> <table class="accountTable tabular grid"><br /><%%KEEPWHITESPACE%%> <tbody><tr><br /><%%KEEPWHITESPACE%%> <th colspan="2" class="leftAlign">Your Personal Membership Information</th><br /><%%KEEPWHITESPACE%%> </tr><br /><%%KEEPWHITESPACE%%> <tr><br /><%%KEEPWHITESPACE%%> <td class="rightAlignTop"><label class="checkoutLabel">* Birthdate </label></td><br /><%%KEEPWHITESPACE%%> <td>&nbsp;<input class="regula-validation checkoutTop" id="Contact0Birthday" name="Contact0Birthday" size="10" placeholder="" type="date"><br /><%%KEEPWHITESPACE%%> </td><br /><br /><%%KEEPWHITESPACE%%> </tr><br /><%%KEEPWHITESPACE%%> <tr><br /><%%KEEPWHITESPACE%%> <td class="rightAlign"><br /><%%KEEPWHITESPACE%%> <label class="checkoutLabel"><br /><br /><%%KEEPWHITESPACE%%> * Create Password<br /><br /><%%KEEPWHITESPACE%%> </label><br /><%%KEEPWHITESPACE%%> </td><br /><%%KEEPWHITESPACE%%> <td>&nbsp;<input class="regula-validation checkout" id="Contact0Password" name="Contact0Password" size="16" type="password"><br /><br /><%%KEEPWHITESPACE%%> </td><br /><%%KEEPWHITESPACE%%> </tr><br /><%%KEEPWHITESPACE%%> <tr><br /><%%KEEPWHITESPACE%%> <td>&nbsp;</td><br /><%%KEEPWHITESPACE%%> </tr><br /><br /><%%KEEPWHITESPACE%%> </tbody></table><br /></div><br /></div><br /><br />
How To Check If a Contact Has a Tag
$query = array(‘ContactId’ => $contactId,
‘GroupId’ => 1133);
$contacts = $app->dsCount(“ContactGroupAssign”,$query);
echo “
"; print_r($contacts); echo "
“;
How To See What Variables Are Passed In An HTTP Post
- « Previous Page
- 1
- …
- 24
- 25
- 26
- 27
- 28
- …
- 32
- Next Page »