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.

Custom Fields in s2member Pro Form

Home Forums Community Forum Custom Fields in s2member Pro Form

This topic contains 3 replies, has 2 voices. Last updated by  Jason (Lead Developer) 4 years, 11 months ago.

Topic Author Topic
Posted: Monday Feb 6th, 2012 at 5:35 pm #4165
barbaros
Username: barbaros

Hi, the following line is stated in paypal-checkout-form.php ” Custom Fields will NOT be displayed to existing Users/Members that are already logged-in. s2Member assumes this information has already been collected in that case.”
However, I would like to have the additional fields to be displayed in the pro form both when users are logged-in and logged-out. Im using the additional fields to record productinformation for customizing the product that Im selling, and I want (logged-in) members to be able to order the same product again with different customizations. I hope this did not add to the confusion.. Is there a way to achieve this?

Further, I have not been able to carry over additional fields, actually one specific addtional field, to the ‘create profile’ section. I would love to have ‘Company Name’ displayed right above ‘First Name’ in the same ‘create profile’ section?

Is it also possible to pass the ‘Company Name’ through to Paypal (Express Checkout) so that the company name will be visible on the Paypal receipt received by the customer (and the automatically generated emails by s2member?

Thank you for your time.
Barbaros

ps Im running WP 3.3.1 | s2Member 111220 | Paypal Express Checkout

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Feb 7th, 2012 at 1:59 pm #4381
Staff Member

Hi there. Thanks for your inquiry.

However, I would like to have the additional fields to be displayed in the pro form both when users are logged-in and logged-out. Im using the additional fields to record productinformation for customizing the product that Im selling, and I want (logged-in) members to be able to order the same product again with different customizations. I hope this did not add to the confusion.. Is there a way to achieve this?

This will require some custom tweaks because it’s not something s2Member does by default.

You can open this file in your installation:
/s2member-pro/includes/separates/gateways/paypal/paypal.js

At line #623 find this line:

}) ();

Replace with:

});

Now save paypal.js as paypal-min.js in the same directory, overriding the existing copy.

That will prevent s2Member Pro from hiding the fields to logged-in users upon checkout for a second or third time. However, this does NOT change anything in the way s2Member processes the form submission. Any data that is collected from an existing customer for Custom Registration/Profile Fields will be ignored by s2Member. So, if you need to use this information again, you would need to hack that in with Hooks/Filters of your own perhaps.


Please note that s2Member stores Profile Fields for each User/Member, and those cannot be duplicated in storage across multiple purchases. In other words, the Custom Registration/Profile Fields that you create, are filled once for each User/Member, during the initial checkout experience.

Of course, a User/Member can update their Profile Fields in the future, but they can’t add new Profile Fields, or have multiple values for the same Profile Fields (e.g. they only have one Profile).

Suggestion: I would recommend that you customize the Pro Form templates and perhaps add some of your own form processing routines to handle anything that goes above & beyond what Custom Registration/Profile fields can handle.

Please see this FAQ article for instructions on how to customize Pro Form templates:
http://www.s2member.com/faqs/#s2-faqs-pro-form-template-mods

Posted: Tuesday Feb 7th, 2012 at 2:01 pm #4382
Staff Member

Further, I have not been able to carry over additional fields, actually one specific addtional field, to the ‘create profile’ section. I would love to have ‘Company Name’ displayed right above ‘First Name’ in the same ‘create profile’ section?

The “Create Profile” section establishes the default profile fields which are required to complete a transaction. Anything custom that you add with Custom Registration/Profile Fields will appear below this section in the “Additional Fields” area. Of course, you can modify this a bit further if you’re customizing your own Pro Form templates, as I mentioned above.

Posted: Tuesday Feb 7th, 2012 at 2:08 pm #4384
Staff Member

Is it also possible to pass the ‘Company Name’ through to Paypal (Express Checkout) so that the company name will be visible on the Paypal receipt received by the customer (and the automatically generated emails by s2member?

The PayPal Pro API does not allow for any custom data like this to be tied directly to a transaction itself (i.e. processed by PayPal and sent via email by PayPal… not possible in the current release). However, here are some things you can do, which might be alternatives to consider.

1. Put whatever you want to see in the email from PayPal in the desc="" Attribute of your Pro Form Shortcode. This will be processed and sent via email by PayPal.

2. You can also pipe in additional custom data, into the custom="" Attribute of your Pro Form Shortcode, making it possible to collect this custom information and re-use it inside email templates that you configure with s2Member, or even in API Notifications processed by s2Member.

For further details on #2, please check your Dashboard under:
s2Member -> PayPal Pro Forms -> Shortcode Attributes (Explained)
See the section that documents the custom="" Shortcode Attribute please.

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