Updating lead import
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 13 May 2019 12:53:13 +0000 (08:53 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 13 May 2019 12:53:13 +0000 (08:53 -0400)
new fields for leads table.

models/admin/management/leads.php

index 1ba1db8..0ff0fc0 100644 (file)
@@ -754,34 +754,40 @@ class GlmMembersAdmin_management_leads // extends GlmDataLeadsManagement
                 $this->wpdb->insert(
                     GLM_MEMBERS_LEADS_PLUGIN_DB_PREFIX. 'lead_entry',
                     array(
-                        'source_id'      => $source_id,
-                        'lead_id'        => $lead_id,
-                        'fname'          => $contact['fname'],
-                        'lname'          => $contact['lname'],
-                        'org'            => $contact['company'],
-                        'addr1'          => $contact['address'],
-                        'addr2'          => $contact['address2'],
-                        'city'           => $contact['city'],
-                        'state'          => $contact['state'],
-                        'zip'            => $contact['zip'],
-                        'phone'          => $contact['phone'],
-                        'fax'            => $contact['fax'],
-                        'date_submitted' => $contact['create_date'],
+                        'source_id'        => $source_id,
+                        'lead_id'          => $lead_id,
+                        'fname'            => $contact['fname'],
+                        'lname'            => $contact['lname'],
+                        'org'              => $contact['company'],
+                        'addr1'            => $contact['address'],
+                        'addr2'            => $contact['address2'],
+                        'city'             => $contact['city'],
+                        'state'            => $contact['state'],
+                        'zip'              => $contact['zip'],
+                        'phone'            => $contact['phone'],
+                        'fax'              => $contact['fax'],
+                        'date_submitted'   => $contact['create_date'],
+                        'cleaned'          => $contact['cleaned'],
+                        'cleaned_imported' => $contact['cleaned_imported'],
+                        'updated_date'     => $contact['updated_date']
                     ),
                     array(
-                        '%d',
-                        '%d',
-                        '%s',
-                        '%s',
-                        '%s',
-                        '%s',
-                        '%s',
-                        '%s',
-                        '%s',
-                        '%s',
-                        '%s',
-                        '%s',
-                        '%s',
+                        '%d', // source_id
+                        '%d', // lead_id
+                        '%s', // fname
+                        '%s', // lname
+                        '%s', // onrg
+                        '%s', // addr1
+                        '%s', // addr2
+                        '%s', // city
+                        '%s', // state
+                        '%s', // zip
+                        '%s', // phone
+                        '%s', // fax
+                        '%s', // date_submitted
+                        '%s', // cleaned
+                        '%s', // cleaned_imported
+                        '%s', // updated_date
                     )
                 );
                 $lead_entry_id = $this->wpdb->insert_id;