Marty DeVall

Forum Replies Created

Viewing 16 posts - 1 through 16 (of 16 total)
in reply to: Subscribed users not able to Download #186236

Marty DeVall
Participant

I opened the WP editor on may specific download page and it works now. It must have been a issue with WordPress after an update. The Registration page was showing that the subscriber was logged in, but when I opened the download page or other pages, it did not show at the top the the subscriber was logged in. After just saving the page now it shows the subscriber is logged in and the download links are all showing on the download page.


Marty DeVall
Participant

More Typo’s after switching to the new functions…

Here is the full example working now.

add_action('wpdm_update_profile_field_html','tps_user_profile_fields',10,1);
function tps_user_profile_fields($user){
	//Add to WP Download Manager Profile Edit window
?>
    <div class="col-md-6">
        <label for="cn_tps">Company Name: </label>
		<input type="text" value="<?php echo get_user_meta($user->ID, 'cn_tps',true); ?>" class="form-control" name="cn_tps" id="cn_tps">
    </div>
    <div class="col-md-6">
        <label for="tp_tps">Title or Profession: </label>
        <input type="text" value="<?php echo get_user_meta($user->ID, 'tp_tps', true); ?>" class="form-control" name="tp_tps" id="tp_tps"> 
    </div>
    <div class="col-md-6">
        <label for="sa_tps">Company Street Address: </label>
        <input type="text" value="<?php echo get_user_meta($user->ID, 'sa_tps', true); ?>" class="form-control" name="sa_tps" id="sa_tps"> 
    </div>
    <div class="col-md-6">
        <label for="sa2_tps">Company Street Address 2: </label>
        <input type="text" value="<?php echo get_user_meta($user->ID, 'sa2_tps', true); ?>" class="form-control" name="sa2_tps" id="sa2_tps"> 
    </div>
    <div class="col-md-4">
        <label for="ci_tps">City: </label>
        <input type="text" value="<?php echo get_user_meta($user->ID, 'ci_tps', true); ?>" class="form-control" name="ci_tps" id="ci_tps"> 
    </div>
    <div class="col-md-4">
        <label for="st_tps">State or Province: </label>
        <input type="text" value="<?php echo get_user_meta($user->ID, 'st_tps', true); ?>" class="form-control" name="st_tps" id="st_tps"> 
    </div>
    <div class="col-md-4">
        <label for="zip_tps">Postal Code: </label>
        <input type="text" value="<?php echo get_user_meta($user->ID, 'zip_tps', true); ?>" class="form-control" name="zip_tps" id="zip_tps"> 
    </div>
    <div class="col-md-6">
        <label for="phone_tps">Phone: </label>
        <input type="text" value="<?php echo get_user_meta($user->ID, 'phone_tps', true); ?>" class="form-control" name="phone_tps" id="phone_tps"> 
    </div>
    <div class="col-md-6">
        <label for="fax_tps">Fax: </label>
        <input type="text" value="<?php echo get_user_meta($user->ID, 'fax_tps', true); ?>" class="form-control" name="fax_tps" id="fax_tps"> 
    </div>
    <div class="col-md-6">
        <label for="country_tps">Country: </label>
        <input type="text" value="<?php echo get_user_meta($user->ID, 'country_tps', true); ?>" class="form-control" name="country_tps" id="country_tps"> 
    </div>
	
<?php
}
add_action('wpdm_update_profile','tps_update_profile'); 
function tps_update_profile()
{ 
if(!is_user_logged_in()) return true;
  $uid = get_current_user_id();
  update_user_meta($uid, 'cn_tps', wpdm_query_var('cn_tps'));
  update_user_meta($uid, 'tp_tps', wpdm_query_var('tp_tps'));
  update_user_meta($uid, 'sa_tps', wpdm_query_var('sa_tps'));
  update_user_meta($uid, 'sa2_tps', wpdm_query_var('sa2_tps'));
  update_user_meta($uid, 'ci_tps', wpdm_query_var('ci_tps'));
  update_user_meta($uid, 'st_tps', wpdm_query_var('st_tps'));
  update_user_meta($uid, 'zip_tps', wpdm_query_var('zip_tps'));
  update_user_meta($uid, 'phone_tps', wpdm_query_var('phone_tps'));
  update_user_meta($uid, 'fax_tps', wpdm_query_var('fax_tps'));
  update_user_meta($uid, 'country_tps', wpdm_query_var('country_tps'));
} 

Marty DeVall
Participant

Sorry, I found another typo.

The code should have been….
add_action(‘wpdm_update_profile’,’tps_update_profile’);
function tps_update_profile()
{

if(!is_user_logged_in()) return true;
  $uid = get_current_user_id();
  update_user_meta($uid, 'cn_tps', wpdm_query_var('cn_tps'));
  update_user_meta($uid, 'tp_tps', wpdm_query_var('tp_tps'));
  update_user_meta($uid, 'sa_tps', wpdm_query_var('sa_tps'));
  update_user_meta($uid, 'sa2_tps', wpdm_query_var('sa2_tps'));
  update_user_meta($uid, 'ci_tps', wpdm_query_var('ci_tps'));
  update_user_meta($uid, 'st_tps', wpdm_query_var('st_tps'));
  update_user_meta($uid, 'zip_tps', wpdm_query_var('zip_tps'));
  update_user_meta($uid, 'phone_tps', wpdm_query_var('phone_tps'));
  update_user_meta($uid, 'fax_tps', wpdm_query_var('fax_tps'));
  update_user_meta($uid, 'country_tps', wpdm_query_var('country_tps'));
}

Clicking on the “Save Changes” shows the popup window that says the Profile Data is Updated.

When I check to see if the data is actually saved or it matches the same fields when editing the user under normal wordpress, it does not!!

The sad thing is this had been working for a number of years, but broke during an upgrade.


Marty DeVall
Participant

Okay, fixed my typo…. but still not getting it to work. Have tracked it down to wpdm_update_profile function. The function wpdm_update_profile_field_html is causing the extra fields to show on the profile edit screen. When add this line in, add_action('wpdm_update_profile','tps_update_profile'); it fails to perform the SAVE. WHen I click on “Save Changes” it changes to “Please Wait…” and never changes back to “Save Changes”.

Can you double check my code? The example is very short.

add_action(‘wpdm_update_profile’,’tps_update_profile’);
function tps_update_profile()

{ 
  if(!is_user_logged_in()) return true;
  update_user_meta(get_curren_user_id(), 'cn_tps', wpdm_query_var('cn_tps'));
  update_user_meta(get_curren_user_id(), 'tp_tps', wpdm_query_var('tp_tps'));   
} 

DO you have any info on wpdm_query_var()?


Marty DeVall
Participant

Oops I see my type now…….Thanks!


Marty DeVall
Participant

Not sure what you mean. I did already tried that function. ‘function wpdm_update_profile_field_html’
Do you have another example you can provide? My code below is not working.

add_action('wpdm_update_profile_filed_html','tps_user_profile_fields',10,1);
function tps_user_profile_fields($user){
	//Add to WP Download Manager Profile Edit window
?>
    <div class="col-md-6">
        <label for="cn_tps">Company Name: </label>
		<input type="text" value="<?php echo get_user_meta($user->ID, 'cn_tps',true); ?>" class="form-control" name="cn_tps" id="cn_tps">
    </div>
    <div class="col-md-6">
        <label for="tp_tps">Title or Profession: </label>
        <input type="text" value="<?php echo get_user_meta($user->ID, 'tp_tps', true); ?>" class="form-control" name="tp_tps" id="tp_tps"> 
    </div>	
<?php
}
add_action('wpdm_update_profile','tps_update_profile'); 
function tps_update_profile()
{ 
  if(!is_user_logged_in()) return true;
  update_user_meta(get_curren_user_id(), 'cn_tps', wpdm_query_var('cn_tps'));
  update_user_meta(get_curren_user_id(), 'tp_tps', wpdm_query_var('tp_tps'));   
} 
in reply to: Getting error on Registration Page after submit #175922

Marty DeVall
Participant

Here is my full working code using wpdm_register_form. It looks like the function changed and now it requires passing the string ‘wpdmpro’ with the Label string value.

function tps_register_field() {
	//Add to WP download manager Registration Form
?>
    <div class="form-group form-text"><p>Additional Contact Required Fields</p></div><hr>
    <div class="row">
    <div class="form-group col-sm-12 col-md-6">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="cn_tps"><?php _e('Company Name','wpdmpro'); ?></label>
        <input class="form-control" required="required" type="text" tabindex="102" size="20" class="required" placeholder="Company Name" id="cn_tps" value="" name="cn_tps">
       </div>
    </div>
    <div class="form-group col-sm-12 col-md-6">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="tp_tps"><?php _e('Title or Profession','wpdmpro'); ?></label>
        <input class="form-control" required="required" type="text" tabindex="102" size="20" class="required" placeholder="Title or Profession" id="tp_tps" value="" name="tp_tps">
       </div>
    </div>
    <div class="form-group col-sm-12 col-md-6">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="sa_tps"><?php _e('Company Street Address','wpdmpro'); ?></label>
        <input class="form-control" required="required" type="text" tabindex="102" size="20" class="required" placeholder="Company Street Address" id="sa_tps" value="" name="sa_tps">
       </div>
    </div>
    <div class="form-group col-sm-12 col-md-6">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="sa2_tps"><?php _e('Street Address 2','wpdmpro'); ?></label>
        <input class="form-control" type="text" tabindex="102" size="20" class="required" placeholder="Street Address 2" id="sa2_tps" value="" name="sa2_tps">
       </div>
    </div>
    <div class="form-group col-sm-12 col-md-4">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="ci_tps"><?php _e('City','wpdmpro'); ?></label>
        <input class="form-control" required="required" type="text" tabindex="102" size="20" class="required" placeholder="City" id="ci_tps" value="" name="ci_tps">
       </div>
    </div>
    <div class="form-group col-sm-12 col-md-4">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="st_tps"><?php _e('State or Province','wpdmpro'); ?></label>
        <input class="form-control" required="required" type="text" tabindex="102" size="20" class="required" placeholder="State or Province" id="st_tps" value="" name="st_tps">
       </div>
    </div>
    <div class="form-group col-sm-12 col-md-4">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="zip_tps"><?php _e('Postal Code','wpdmpro'); ?></label>
        <input class="form-control" required="required" type="text" tabindex="102" size="20" class="required" placeholder="Postal Code" id="zip_tps" value="" name="zip_tps">
       </div>
    </div>
    <div class="form-group col-sm-12 col-md-6">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="phone_tps"><?php _e('Phone','wpdmpro'); ?></label>
        <input class="form-control" required="required" type="text" tabindex="102" size="20" class="required" placeholder="Phone" id="phone_tps" value="" name="phone_tps">
       </div>
    </div>
    <div class="form-group col-sm-12 col-md-6">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="fax_tps"><?php _e('FAX','wpdmpro'); ?></label>
        <input class="form-control" type="text" tabindex="102" size="20" class="required" placeholder="FAX" id="fax_tps" value="" name="fax_tps">
       </div>
    </div>
    <div class="form-group col-sm-12 col-md-6">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="country_tps"><?php _e('Country','wpdmpro'); ?></label>
        <input class="form-control" type="text" tabindex="102" size="20" class="required" placeholder="Country" id="country_tps" value="" name="country_tps">
       </div>
    </div>
</div>
    <div class="form-group form-text"><p>Please Answer Required Questions</p></div><hr>
   <div class="row input-group-tps input-group-md">
    <div class="col-sm-12 col-md-6">
        <label class="control-label" for="pi_tps"><?php _e('Do you currently have ThinPATH Systems products in use?','wpdmpro'); ?></label>
		<span class="control-label required">Yes</span> 
		<input  type="radio" name="pi_tps" value="yes" class="required" id="pi_tps">
		<span class="control-label required">No</span> 
		<input  type="radio" name="pi_tps" value="no"  class="required" id="pi_tps">
        <label class="control-label"><?php _e('If so, please select all that apply:','wpdmpro'); ?></label><br>
		<input type="checkbox" name="NCDTerm_tps" value="yes" class="required" id="NCDTerm_tps">
		<label class="control-label required" for="NCDTerm_tps"><?php _e('NCD Legacy X11 Terminals','wpdmpro'); ?></label><br> 
		<input type="checkbox" name="PCXware_tps" value="yes" class="required" id="PCXware_tps">
		<label class="control-label required" for="PCXware_tps"><?php _e('PC-Xware X11 Software','wpdmpro'); ?></label><br>  
		<input type="checkbox" name="Tisio_tps" value="yes" class="required" id="Tisio_tps">
		<label class="control-label required" for="Tisio_tps"><?php _e('Tisio Thin Clients','wpdmpro'); ?></label><br>  
		<input type="checkbox" name="TPPlus_tps" value="yes" class="required" id="TPPlus_tps">
		<label class="control-label required" for="TPPlus_tps"><?php _e('ThinPATH Plus for Terminal Services','wpdmpro'); ?></label><br>  
		<input type="checkbox" name="TPPortal_tps" value="yes" class="required" id="TPPortal_tps">
		<label class="control-label required" for="TPPortal_tps"><?php _e('ThinPATH PC Suite','wpdmpro'); ?></label><br>  
		<input type="checkbox" name="TPPC_tps" value="yes" class="required" id="TPPC_tps">
		<label class="control-label required" for="TPPC_tps"><?php _e('ThinPATH PC','wpdmpro'); ?></label><br>  
		<input type="checkbox" name="TPMgr_tps" value="yes" class="required" id="TPMgr_tps">
		<label class="control-label required" for="TPMgr_tps"><?php _e('ThinPATH Manager','wpdmpro'); ?></label><br>  
		<input type="checkbox" name="TPMirror_tps" value="yes" class="required" id="TPMirror_tps">
		<label class="control-label required" for="TPMirror_tps"><?php _e('ThinPATH Mirror','wpdmpro'); ?></label><br>  
    </div>
    <div class="col-sm-12 col-md-6">
        <label class="control-label" for="dis_tps"><?php _e('Are you the decision maker for the purchase of products?','wpdmpro'); ?></label>
		<span class="control-label required">Yes</span> 
		<input  type="radio" name="dis_tps" value="yes" class="required" id="dis_tps">
		<span class="control-label required">No</span> 
		<input  type="radio" name="dis_tps" value="no"  class="required" id="dis_tps"><p></p>
        <label class="control-label" for="time_tps"><?php _e('When do you think your company will make a decision to buy?','wpdmpro'); ?></label>
		<span class="control-label required">Within 30 days</span> 
		<input  type="radio" name="time_tps" value="30 days" class="required" id="time_tps"><br>
		<span class="control-label required">Within 90 days</span> 
		<input  type="radio" name="time_tps" value="90 days"  class="required" id="time_tps"><br>
		<span class="control-label required">Within 120 days</span> 
		<input  type="radio" name="time_tps" value="120 days"  class="required" id="time_tps"><br>
		<span class="control-label required">Unknown</span> 
		<input  type="radio" name="time_tps" value="Unknown"  class="required" id="time_tps">
    </div>
   <div class="col-sm-12 col-md-6"><br>
        <label class="control-label" for="Industry_tps"><?php _e('What category best describes your business?','wpdmpro'); ?></label>
		<select class="control-label required" name="Industry_tps" size="1" id="Industry_tps">
		<option class="control-label required"value>Select...</option>
		<option class="control-label required" value="Aerospace">Aerospace</option>
		<option class="control-label required" value="Banks">Banking</option>
		<option class="control-label required" value="General Computing">Computing</option>
		<option class="control-label required" value="Education">Education</option>
		<option class="control-label required" value="Government">Government</option>
		<option class="control-label required" value="General Health Care">Health Care</option>
		<option class="control-label required" value="Insurance">Insurance</option>
		<option class="control-label required" value="General Manufacturing">Manufacturing</option>
		<option class="control-label required" value="Reseller">Reseller</option>
		<option class="control-label required" value="General Retail">Retail</option>
		<option class="control-label required" value="General Telecommunications">Telecommunications</option>
		<option class="control-label required" value="General Transportation">Travel/Transportation</option>
		<option class="control-label required" value="General Utilities">Utilities</option>
		</select>	
    </div>
    <div class="col-sm-12 col-md-6"><br>
        <label class="control-label" for="impactSize_tps"><?php _e('How many users will this solution impact?','wpdmpro'); ?></label>
		<select class="control-label required" name="impactSize_tps" size="1" id="impactSize_tps">
		<option class="control-label required" value>Select...</option>
		<option class="control-label required" value="0-20">0 - 20</option>
		<option class="control-label required" value="20-49">21 - 49</option>
		<option class="control-label required" value="50-99">50 - 99</option>
		<option class="control-label required" value="100-199">100 - 199</option>
		<option class="control-label required" value="200+">200+</option>
		<option class="control-label required" value="Unknown">Unknown</option>
		</select>	
	</div>
    <div class="col-sm-12 col-md-6"><br>
        <label class="control-label" for="Application_tps"><?php _e('What solution are you looking to implement?','wpdmpro'); ?></label>
		<select class="control-label required" name="Application_tps" size="1" id="Application_tps">
        <option class="control-label required" value>Select...</option>
        <option class="control-label required" value="Additional legacy NCD Terminals">Additional legacy NCD Terminals</option>
        <option class="control-label required" value="Deploy a managed Thin Client solution">Deploy a managed Thin Client solution</option>
        <option class="control-label required" value="Deploy Thin Client device">Deploy Thin Client devices</option>
        <option class="control-label required" value="Thin Client Point of Sale solution">Thin Client Point of Sale solution</option>
        <option class="control-label required" value="Use any PC as Thin Client">Use any PC as Thin Client</option>
        <option class="control-label required" value="Extend serial port access for Terminal Services">Extend serial port access for Terminal Services</option>
        <option class="control-label required" value="Run X11 Emulation on MS Windows">Run X11 Emulation on MS Windows</option>
        <option class="control-label required" value="Run X11 Emulation on Terminal Services">Run X11 Emulation on Terminal Services</option>
        <option class="control-label required" value="Terminal Emulation">Terminal Emulation</option>
        <option class="control-label required" value="Linux/UNIX application access">Linux/UNIX application access</option>
        <option class="control-label required" value="Other Terminal Emulation">Other Terminal Emulation</option>
        <option class="control-label required" value="Other">Other</option>
        </select>
	</div>				
    <div class="col-sm-12 col-md-6"><br>
        <label class="control-label" for="leadSource_tps"><?php _e('How did you hear about ThinPATH Systems?','wpdmpro'); ?></label>
		<select class="control-label required" name="leadSource_tps" size="1" id="leadSource_tps">
        <option class="control-label required" value>Select...</option>
        <option class="control-label required" value="Web Search">Web Search</option>
        <option class="control-label required" value="Advertisement">Advertisement</option>
        <option class="control-label required" value="Current Customer">Current Customer</option>
        <option class="control-label required" value="Customer Referral">Customer referral</option>
        <option class="control-label required" value="Direct eMail">Direct eMail</option>
        <option class="control-label required" value="ThinPATH called me">ThinPATH contacted me</option>
        <option class="control-label required" value="Product review or article">Product review or article</option>
        <option class="control-label required" value="Trade Show">Trade Show</option>
        <option class="control-label required" value="VAR recommendation">VAR recommendation</option>
        </select>
	</div>
   </div><br>

<?php
} 

add_action('wpdm_register_form','tps_register_field');
in reply to: Getting error on Registration Page after submit #175918

Marty DeVall
Participant

So adding <?php _e('Company Name','wpdmpro'); ?> in place of “Company Name” did fix my issue.

I am looking for help on the wpdm_update_profile_filed_html Pro Action function. The link seems to be missing….
https://www.wpdownloadmanager.com/doc/action-reference/wpdm_update_profile_filed_html/

in reply to: Getting error on Registration Page after submit #175914

Marty DeVall
Participant

Looks like problem has to do with using wpdm_register_form…….

In looking at the example….

<?php
add_action('wpdm_register_form','my_register_field');
function my_register_field() {
?>
    <p class="form-group">
        <label class="control-label" for="fb_id"><?php _e('Facebook Profile Link','wpdmpro'); ?></label>
        <input class="form-control" required="required" type="text" tabindex="102" size="20" class="required"  id="fb_id" value="" name="fb_id">
    </p>

<?php
} 
?>

I see this new code….
<?php _e('Facebook Profile Link','wpdmpro'); ?>

Is this something that was added???

We just have the Label string it self?

function tps_register_field() {
	//Add to WP download manager Registration Form
?>
    <div class="form-group form-text"><p>Additional Contact Required Fields</p></div><hr>
    <div class="row">
    <div class="form-group col-sm-12 col-md-6">
       <div class="input-group-tps input-group-md">
        <label class="control-label" for="cn_tps">Company Name</label>
        <input class="form-control" required="required" type="text" tabindex="102" size="20" class="required" placeholder="Company Name" id="cn_tps" value="" name="cn_tps">
       </div>
    </div>

<label class="control-label" for="cn_tps">Company Name</label>

Is this now required using this now?
<?php _e('Company Name','wpdmpro'); ?>

in reply to: Custom template variable for a WP shortcode #122257

Marty DeVall
Participant

Found your Action and Filter reference, they seem to be providing what we need, to provide hooks to send out email when downloading and adding form fields to the Registration form.

Is there an action “wpdm_user_register” or do you just use add_action(user_register, my_function)?
Is there an action “wpdm_registration_errors” or do you just use add_action(registration_errors, my_function)?

in reply to: Block Editor while editing a File Page #122255

Marty DeVall
Participant

No, but that is my problem. The resulting html page does not include the 2nd column. When using the WP Block editor to add a DIV Row with 2 columns, the right column is not displayed. The wpdm page template code seems to be ignoring that data.

If I remove the Row (Div – Bootstrap) and show the sidebar through the WP Widgets and page template “with sidebar” that does work. I wanted to control the contents of the sidebar through the Block editor.

It is not a requirement it work this way because there is a workaround, just to display the sidebar the traditional way.

Just want you to be aware of the issue with the Block editor vs the classic editor.

in reply to: Block Editor while editing a File Page #122011

Marty DeVall
Participant

Please respond to my question?

in reply to: Custom template variable for a WP shortcode #122010

Marty DeVall
Participant

Is there a way to use a WP shortcode in your email template?

What is your native language, I will translate?

in reply to: Block Editor while editing a File Page #121964

Marty DeVall
Participant

http://www.tp-sys.com/download and https://www.tp-sys.com/download/test-download/

I have on test file download page:https://www.tp-sys.com/download/test-download/

In blockeditor have basicly defined the following:
(Title of Page)
<div class=”row”>
(Page Description Area) ***Displays normally****
<div class=”col-md-9 col-sm-12″>
</div>
<div class=”col-md-3 col-sm-12″>
(Page Sidebar area) ***This output is missing****
</div>
</div>

Link Template value: Metro Style
Page Template Value: 2 Columns, Image Right

The “Page Sidebar area” coded contains a defined reusable block from Block editor. This section does not display.

in reply to: Block Editor while editing a File Page #121927

Marty DeVall
Participant

Yes this lets me edit in the block editor window, but it looks like the page template setting overrides everything, just pulls the Title (Template Var) and anything below goes into the Description (Template Var). I am just implementing the page’s sidebar in the block editor and not getting it from the WP widgets section. My added Row 75%/25% is getting ignored by the Page template setting. I guess I need to create a custom template with a sidebar section that is split 75%/25%. Is there a way to make a Sidebar (Template Var), so the content get included in the Template page?

in reply to: Custom template variable for a WP shortcode #121921

Marty DeVall
Participant

It is a package generated key. There is a Linux compiled program that returns the license string. It is based on the current date plus 30 days and it depends on which product they are downloading. We have around 10 downloads that will need to receive an evaluation license string. Right now we pass the product name to the shortcode so it knows which product key to create. We can configure it to pass any string, like the Title of the Download, would work. Can modify the shortcode to accept the Title value.

Also, we are requiring the user to subscribe and create an account and be logged in to download. So we know the user’s email address, it is associated with his login, just need to send an email with the license key. The email lock is not required if we can send an email using the user’s email address and included the license string.

Viewing 16 posts - 1 through 16 (of 16 total)