Website Membership profile to email
8 posts by 3 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: August 1, 2011 (RSS)
By mattbcd - July 5, 2011
I need to create a form which packages certain items of a user's membership profile (e.g. name, address) with a couple of extra options and sends them to a separate email so they can receive a paper.
I'm sure this is quite straightforward in reality, but I can't work out how to do it. I've attached a grab of the page as it looks at present. My ideal would be for the logged in user to be able to select one of the papers, hit 'Send Request' and be then sent to a confirmation page. A rep would receive this email and arrange for delivery.
Any help would be grovellingly received!
Matt
Re: [mattbcd] Website Membership profile to email
By Jason - July 5, 2011
To help get us started, could you tell me how far you've gotten so far? What happens currently when someone hits "Send Request"? When someone is on this page, are they already logged in? How is the rep's e-mail address being stored?
Any information you can send to clarify would be helpful.
Thanks
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Website Membership profile to email
By mattbcd - July 6, 2011
I've created a section in CMS called singleRep, which contains the email address of the rep.
Re: [mattbcd] Website Membership profile to email
By Jason - July 7, 2011
If you take a look at the sample signup form that comes with the membership plugin, you'll see an example of how to send an email. Any information that you need to put into the email from the user that's logged in can be accessed through the $CURRENT_USER variable. For example, you can get the email address of the current user like this:
$CURRENT_USER['email']
Finally, you'll need to find a way of getting the correct "singleRep" email based on a selection that the user made.
One other suggestion, you may want to use radio buttons instead of check boxes so that a user can only make a single selection.
Hope this helps get you started.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Website Membership profile to email
By mattbcd - July 8, 2011
Re: [mattbcd] Website Membership profile to email
By mattbcd - July 20, 2011
I've had a look at the signup form. The way i see it would be to modify the form so that when the user checks checkboxes (I've added 3 checkbox fields in the User Accounts section editor), this would add their choice(s) to their user account and trigger an email, called e.g. /emails/publication-email.php This email would be sent to the rep, and take its content using $CURRENT_USER tags.
My main question at this stage is which bits of the header PHP to use or delete, or whether to leave it all alone.
e.g. // check for duplicate usernames and emails
// add user
// generate password
// create accesslist entry
As they seem to be extraneous to the job the form should be doing - which is adding 3 bits of info to their User Account, and sending this and their contact details to an email address - should I remove these sections entirely?
Re: [mattbcd] Website Membership profile to email
By Jason - July 20, 2011
If you user already exists, you don't need to any of the code that would create a user, generate a password, or make entries to access list.
If you wanted to save their selections to their account, you would have to add a mySQL UPDATE statement to do so (take a look at the example profile page). If you don't want to save their selections, you won't need that either.
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [mattbcd] Website Membership profile to email
By gkornbluth - August 1, 2011
Just curious if you got this working and would be willing to share your solution.
Thanks,
Jerry Kornbluth
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php