Update new membership form for migcsa hotfix/1.0.23
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 15 Feb 2019 18:36:26 +0000 (13:36 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 15 Feb 2019 18:36:26 +0000 (13:36 -0500)
Migcsa update.
Company name and title should be transfered to Company info
Also transfer the first and last name.

index.php
models/front/billing/becomeMember.php
views/front/billing/becomeMember.html

index fe1be44..ae3d17d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Billing
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: This is glmAssociate Billing Module
- * Version: 1.0.22
+ * Version: 1.0.23
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersBillingAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.0.22
+ * @version 1.0.23
  */
 
 /*
@@ -37,7 +37,7 @@
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.22');
+define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.23');
 define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.26');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index f56704f..5c6eba7 100644 (file)
@@ -287,6 +287,8 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling
             $wpRole             = $this->config['contact_role_wordpress'][$contactRoleNumb];
             $memberContactEmail = filter_var( $_REQUEST['email'], FILTER_VALIDATE_EMAIL );
             $memberLogin        = filter_var( $_REQUEST['username'] );
+            $org                = filter_var( $_REQUEST['org'] );
+            $title              = filter_var( $_REQUEST['title'] );
             $this->wpdb->insert(
                 GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . 'contacts',
                 array(
@@ -303,6 +305,10 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling
                     'create_time'      => date('Y-m-d H:i:s', time()),
                     'ref_type'         => $this->config['ref_type_numb']['Member'],
                     'ref_dest'         => $member_id,
+                    'org'              => $org,
+                    'title'            => $title,
+                    'business_fname'   => $member_fname,
+                    'business_lname'   => $member_lname,
                     'business_addr1'   => $billing_addr1,
                     'business_city'    => $billing_city_id,
                     'business_state'   => $billing_state,
@@ -323,10 +329,14 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling
                     '%s', // create_time
                     '%d', // ref_type
                     '%d', // ref_dest
-                    '%s', // addr1
-                    '%s', // city
-                    '%s', // state
-                    '%s', // zip
+                    '%s', // org
+                    '%s', // title
+                    '%s', // business_fname
+                    '%s', // business_lname
+                    '%s', // business_addr1
+                    '%s', // business_city
+                    '%s', // business_state
+                    '%s', // business_zip
                     '%s', // business_publish
                 )
             );
index 3141cb7..6d99adf 100644 (file)
             <div class="glm-billing-input">
                 <input
                 type="text"
-                name="cf[12]"
-                {if isset($smarty.request.cf[12]) && $smarty.request.cf[12]}value="{$smarty.request.cf[12]}"{/if}
+                name="org"
+                {if isset($smarty.request.cf[12]) && $smarty.request.org}value="{$smarty.request.org}"{/if}
                 />
             </div>
         </div>
             <div class="glm-billing-input">
                 <input
                 type="text"
-                name="cf[7]"
-                {if isset($smarty.request.cf[7]) && $smarty.request.cf[7]}value="{$smarty.request.cf[7]}"{/if}
+                name="title"
+                {if isset($smarty.request.cf[7]) && $smarty.request.title}value="{$smarty.request.title}"{/if}
                 />
             </div>
         </div>