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.

Dynamic Registration Value

Home Forums Community Forum Dynamic Registration Value

This topic contains 4 replies, has 3 voices. Last updated by  Raam Dev 4 years, 1 month ago.

Topic Author Topic
Posted: Tuesday Nov 13th, 2012 at 8:35 am #31441

Hi,

I have a donation box that a user fills in upon registration in case they want to donate. Currently, I have to set a static amount they would be charged. However, I want this value to be changed based on what the user enters in this field (E.G. if they enter 10, I want this to be added to the current registration value).

How may I implement this using s2member?

Thanks.

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Tuesday Nov 13th, 2012 at 1:42 pm #31466
David Welch
Username: dwbiz05

I’m not 100% sure what you’re trying to do here. Are you using this field in the registration form, so they would add the amount prior to clicking the register button?

Dave

Posted: Wednesday Nov 14th, 2012 at 1:00 am #31539

Hi,

Yes. I’m using this field in the PayPal Pro registration form. In other words, I have added a field called “Donation” to s2member’s list of fields, and it is getting displayed in the form.

I could have used a PHP execution plugin to set the ra attribute of the form to the new price if I were using two steps (first for donation, and second for registration) but i want all of this to be in one single step.

Thanks.

Posted: Wednesday Nov 14th, 2012 at 11:11 am #31583
David Welch
Username: dwbiz05

My first thought was to hook into the payment processing but I don’t see any hooks in the file. I’ll have to check some more.

If there is a hook that gives you access to all the data from the form, you could set the “ra” value = to the custom field… but I’ve not found a good hook for it yet.

Dave

Posted: Wednesday Nov 14th, 2012 at 5:00 pm #31614
Raam Dev
Username: Raam
Staff Member

Hi Terry,

I don’t believe this is possible. The s2Member Pro-Forms load through the shortcode. You can change the values of the shortcode attributes before the shortcode gets parsed (i.e., the Pro-Form is displayed), but you can’t change those values after the shortcode has been parsed.

So, there are two ways to create a Pay What You Want type system: If you’re using the PayPal buttons, you can do something like this.

If you’re using Pro-Forms, you’ll need to use a two-step process, with the first step asking for the donation amount and the second step displaying the Pro-Form with the previously entered price dynamically configured into the Pro-Form shortcode.

Viewing 4 replies - 1 through 4 (of 4 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.