latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Pro Form variable pricing

Home Forums Community Forum Pro Form variable pricing

This topic contains 2 replies, has 2 voices. Last updated by  Marcia Lampe 3 years, 11 months ago.

Topic Author Topic
Posted: Sunday Jan 20th, 2013 at 1:38 pm #38437

Is it possible to offer variable pricing based on registration info? I am trying to set up a site for a neighborhood association that charges an annual fee based on the number of adults in the home ($10/adult).

On the registration page, the user enters the number of adults, and I believe with paypal buttons I could edit the cost with javascript. Is anything like that possible using Authorize.net?

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Monday Jan 21st, 2013 at 6:13 pm #38713
Bruce
Username: Bruce
Staff Member

Thanks for your inquiry.

On the registration page, the user enters the number of adults, and I believe with paypal buttons I could edit the cost with javascript. Is anything like that possible using Authorize.net?

Though editing the values of the PayPal Buttons after they are generated is possible, with s2Member’s Pro Forms this is not the case.

s2Member encrypts these Pro Forms based on the encryption key you have set up under Dashboard -› s2Member® -› General Options -› Security Encryption Key. This is for security, so that customers cannot simply change the price by editing the source code of your page.

Therefore, the only way to change the price of your Pro Form is to generate the form with s2Member’s Shortcodes again.

It is possible to dynamically set the price of your Pro Form, though. The easiest way to do this is to use a PHP Execution plugin to decide what the price should be based on a variable that you can set up from within your page.

For example, you could send users to URL like the following:

http://yoursite.com/my-membership-options-page?members=4

If that is the case, you’d want to then multiply the amount of members by 10, and update your Pro Form to accomodate this:

[s2Member-PayPal-Butto... ra="<?php echo $_GET['members']*10; ?>" ... /]

See: s2Member® » Knowledge Base » Using Variables In A Shortcode
See Also: PHP Execution

Posted: Saturday Jan 26th, 2013 at 5:44 pm #39709

I set up something that does pretty much this. I am using an initial registration form to generate a Pro Forms shortcode.

I am passing an array of price related options to my function that calls the shortcode. I would like to store a couple of these options ($price[‘hoa_name’], $price[‘residents’]) in custom fields that are not user editable.

function ipna_call_shortcode($price) {
	if ($price['first_year']==0) {
		$attr = array(
				"level"		=> "0",
				"success"	=> "inmanpark/",
				"register"	=> "1",
				"ccaps"		=> "",
				"captcha"	=> "clean",
				"desc"		=> "Membership is free for your first year",
				"custom"	=> "localhost",
				"tp"		=> "1",
				"td"		=> "Y");	
		echo c_ws_plugin__s2member_pro_authnet_form::sc_authnet_form($attr);

	}

Is there any way to populate custom fields with the option Allow Edits set to No (uneditable and totally invisible)?

Do I need to pass the variables to the success page and run update_user_option with the passed variables?

Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.